Commit 05bbea4b authored by bell@sanja.is.com.ua's avatar bell@sanja.is.com.ua

fixed invalidation of query cache on LOAD DATA

parent 62eda324
...@@ -553,3 +553,14 @@ Table 'test.t1' doesn't exist ...@@ -553,3 +553,14 @@ Table 'test.t1' doesn't exist
drop table t2; drop table t2;
select * from t1 where id=2; select * from t1 where id=2;
Table 'test.t1' doesn't exist Table 'test.t1' doesn't exist
create table t1 (word char(20) not null);
select * from t1;
word
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
load data infile '../../std_data/words.dat' into table t1;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
drop table t1;
...@@ -384,7 +384,6 @@ select * from mysql.db; ...@@ -384,7 +384,6 @@ select * from mysql.db;
enable_result_log; enable_result_log;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
# #
# simple rename test # simple rename test
# #
...@@ -397,3 +396,14 @@ select * from t1 where id=2; ...@@ -397,3 +396,14 @@ select * from t1 where id=2;
drop table t2; drop table t2;
-- error 1146 -- error 1146
select * from t1 where id=2; select * from t1 where id=2;
#
# Load data invalidation test
#
create table t1 (word char(20) not null);
select * from t1;
show status like "Qcache_queries_in_cache";
load data infile '../../std_data/words.dat' into table t1;
show status like "Qcache_queries_in_cache";
drop table t1;
\ No newline at end of file
...@@ -336,6 +336,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, ...@@ -336,6 +336,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
} }
if (transactional_table) if (transactional_table)
error=ha_autocommit_or_rollback(thd,error); error=ha_autocommit_or_rollback(thd,error);
query_cache_invalidate3(thd, table_list, 0);
err: err:
if (thd->lock) if (thd->lock)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment