From 1177bea2f1cd0c9f887670b65c9a403a26f07d76 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 May 2011 16:27:19 +0300 Subject: Rewritten patch of percona - switching query cache on and off, removing comments. client/mysqltest.cc: Column names. mysql-test/r/grant_cache_no_prot.result: fix of text. mysql-test/r/grant_cache_ps_prot.result: Fix of test. mysql-test/r/query_cache.result: Switching on and off query cache. mysql-test/t/query_cache.test: Switching on and off query cache. mysys/charset.c: Fix of parser. sql/handler.cc: thd added to parameters. sql/log_event.cc: thd added to parameters. sql/log_event_old.cc: thd added to parameters. sql/mysql_priv.h: Fixed functions definitions. sql/mysqld.cc: Comments stripping. sql/set_var.cc: Switching on and off query cache. sql/set_var.h: Switching on and off query cache. sql/share/errmsg.txt: New errors. sql/sql_cache.cc: Switching query cache on and off, removing comments. sql/sql_cache.h: thd added to parameters. sql/sql_class.h: Comments stripping. sql/sql_db.cc: thd added to parameters. sql/sql_lex.cc: lex fixed. sql/sql_parse.cc: thd added to parameters. --- mysql-test/r/query_cache.result | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'mysql-test/r/query_cache.result') diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 2380ecc5969..a5ca60e1234 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1639,6 +1639,7 @@ set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_size=default; +set local query_cache_type=default; FLUSH STATUS; SET GLOBAL query_cache_size=10*1024*1024; SET @save_concurrent_insert= @@concurrent_insert; @@ -1823,3 +1824,33 @@ SELECT 1 FROM t1 GROUP BY DROP TABLE t1; SET GLOBAL query_cache_size= default; End of 5.1 tests +New query cache switching OFF mechanism test +set global query_cache_size=1024*1024*20; +set global query_cache_type=on; +select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type; +@@query_cache_size @@global.query_cache_type @@local.query_cache_type +20971520 ON ON +set global query_cache_size=0; +select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type; +@@query_cache_size @@global.query_cache_type @@local.query_cache_type +0 ON ON +set global query_cache_size=1024*1024*20; +select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type; +@@query_cache_size @@global.query_cache_type @@local.query_cache_type +20971520 ON ON +set global query_cache_type=off; +select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type; +@@query_cache_size @@global.query_cache_type @@local.query_cache_type +20971520 OFF OFF +set global query_cache_type=on; +select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type; +@@query_cache_size @@global.query_cache_type @@local.query_cache_type +20971520 ON OFF +set local query_cache_type= on; +select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type; +@@query_cache_size @@global.query_cache_type @@local.query_cache_type +20971520 ON ON +restore defaults +SET GLOBAL query_cache_type= default; +SET GLOBAL query_cache_size= default; +SET LOCAL query_cache_type= default; -- cgit v1.2.1