Commit d13d8aa0 authored by unknown's avatar unknown

fixed invalidation of query cache on LOAD DATA


mysql-test/r/query_cache.result:
  test of LOAD DATA
mysql-test/t/query_cache.test:
  test of LOAD DATA
parent fb2c8c7c
......@@ -553,3 +553,14 @@ Table 'test.t1' doesn't exist
drop table t2;
select * from t1 where id=2;
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;
enable_result_log;
show status like "Qcache_queries_in_cache";
#
# simple rename test
#
......@@ -397,3 +396,14 @@ select * from t1 where id=2;
drop table t2;
-- error 1146
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,
}
if (transactional_table)
error=ha_autocommit_or_rollback(thd,error);
query_cache_invalidate3(thd, table_list, 0);
err:
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