diff options
Diffstat (limited to 'mysql-test/t/query_cache.test')
-rw-r--r-- | mysql-test/t/query_cache.test | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index a3227a5db1d..5dc6d1047f4 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -139,17 +139,17 @@ drop table t1, t2, t3, t11, t21; # # SELECT SQL_CACHE ... # -set sql_query_cache_type=demand; +set query_cache_type=demand; create table t1 (a int not null); insert into t1 values (1),(2),(3); select * from t1; show status like "Qcache_queries_in_cache"; select sql_cache * from t1; -set sql_query_cache_type=2; +set query_cache_type=2; select sql_cache * from t1; show status like "Qcache_hits"; show status like "Qcache_queries_in_cache"; -set sql_query_cache_type=on; +set query_cache_type=on; # # RESET QUERY CACHE # @@ -336,3 +336,34 @@ select a from t1; show status like "Qcache_queries_in_cache"; drop table t1; show status like "Qcache_queries_in_cache"; + +# +# Test of query cache resizing +# +set GLOBAL query_cache_size=1000; +show global variables like "query_cache_size"; +set GLOBAL query_cache_size=1100; +set GLOBAL query_cache_size=1200; +set GLOBAL query_cache_size=1300; +set GLOBAL query_cache_size=1400; +set GLOBAL query_cache_size=1500; +set GLOBAL query_cache_size=1600; +set GLOBAL query_cache_size=1700; +set GLOBAL query_cache_size=1800; +set GLOBAL query_cache_size=1900; +show global variables like "query_cache_size"; + +# +# Temporary tables +# +set GLOBAL query_cache_size=1048576; +create table t1 (i int not null); +create table t2 (i int not null); +select * from t1; +show status like "Qcache_queries_in_cache"; +create temporary table t3 (i int not null); +select * from t2; +show status like "Qcache_queries_in_cache"; +select * from t3; +show status like "Qcache_queries_in_cache"; +drop table t1, t2, t3; |