Commit c4f89626 authored by unknown's avatar unknown

do not allow to cache queries with INTO clause


mysql-test/r/query_cache.result:
  INTO OUTFILE/DUMPFILE test
mysql-test/t/query_cache.test:
  INTO OUTFILE/DUMPFILE test
parent b2ded34f
......@@ -564,3 +564,15 @@ show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
drop table t1;
drop table if exists t1;
create table t1 (a int);
insert into t1 values (1),(2),(3);
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
select * from t1 into outfile "query_caceh.out.file";
select * from t1 limit 1 into dumpfile "query_cache.dump.file";
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
drop table t1;
......@@ -406,4 +406,17 @@ 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;
#
# INTO OUTFILE/DUMPFILE test
#
drop table if exists t1;
create table t1 (a int);
insert into t1 values (1),(2),(3);
show status like "Qcache_queries_in_cache";
select * from t1 into outfile "query_caceh.out.file";
select * from t1 limit 1 into dumpfile "query_cache.dump.file";
show status like "Qcache_queries_in_cache";
drop table t1;
\ No newline at end of file
......@@ -2448,13 +2448,17 @@ procedure_item:
opt_into:
INTO OUTFILE TEXT_STRING
{
if (!(Lex->exchange= new sql_exchange($3.str,0)))
THD *thd= current_thd;
thd->safe_to_cache_query= 0;
if (!(thd->lex.exchange= new sql_exchange($3.str,0)))
YYABORT;
}
opt_field_term opt_line_term
| INTO DUMPFILE TEXT_STRING
{
if (!(Lex->exchange= new sql_exchange($3.str,1)))
THD *thd= current_thd;
thd->safe_to_cache_query= 0;
if (!(thd->lex.exchange= new sql_exchange($3.str,1)))
YYABORT;
};
......
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