summaryrefslogtreecommitdiff
path: root/mysql-test/r/query_cache.result
diff options
context:
space:
mode:
authorSneha MOdi <sneha.modi@oracle.com>2011-11-02 18:42:52 +0530
committerSneha MOdi <sneha.modi@oracle.com>2011-11-02 18:42:52 +0530
commit9ab8418fc0b4f33ca721b10174bdd0cc8fc80c71 (patch)
treed52203d10891c1a9e57e0516c7992a330c3e562b /mysql-test/r/query_cache.result
parente51fcf8f728d5e482017c96737665011b8fd141a (diff)
downloadmariadb-git-9ab8418fc0b4f33ca721b10174bdd0cc8fc80c71.tar.gz
BUG#11754170: TEST CASE FOR BUG#28211 IS DISABLED IN QUERY_CACHE.TEST as RENAME DATABASE
and query_cache don't play along nicely. An alternative for RENAME DATABSE using RENAME TABLE has been used to implement this.
Diffstat (limited to 'mysql-test/r/query_cache.result')
-rw-r--r--mysql-test/r/query_cache.result58
1 files changed, 55 insertions, 3 deletions
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index f209e401764..9e7f427502b 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1583,6 +1583,58 @@ show status like 'Qcache_free_blocks';
Variable_name Value
Qcache_free_blocks 0
Restore default values.
+drop database if exists db1;
+drop database if exists db2;
+set GLOBAL query_cache_size=15*1024*1024;
+create database db1;
+use db1;
+create table t1(c1 int)engine=myisam;
+insert into t1(c1) values (1);
+select * from db1.t1 f;
+c1
+1
+show status like 'Qcache_queries_in_cache';
+Variable_name Value
+Qcache_queries_in_cache 1
+create database db2;
+rename table db1.t1 to db2.t2;
+drop database db1;
+show status like 'Qcache_queries_in_cache';
+Variable_name Value
+Qcache_queries_in_cache 0
+drop database db2;
+set global query_cache_size=default;
+drop database if exists db1;
+drop database if exists db3;
+set GLOBAL query_cache_size=15*1024*1024;
+create database db1;
+create database db3;
+use db1;
+create table t1(c1 int) engine=myisam;
+use db3;
+create table t1(c1 int) engine=myisam;
+use db1;
+insert into t1(c1) values (1);
+use mysql;
+select * from db1.t1;
+c1
+1
+select c1+1 from db1.t1;
+c1+1
+2
+select * from db3.t1;
+c1
+show status like 'Qcache_queries_in_cache';
+Variable_name Value
+Qcache_queries_in_cache 3
+create database db2;
+rename table db1.t1 to db2.t2;
+drop database db1;
+show status like 'Qcache_queries_in_cache';
+Variable_name Value
+Qcache_queries_in_cache 1
+drop database db2;
+drop database db3;
set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
set GLOBAL query_cache_min_res_unit=default;
@@ -1609,7 +1661,7 @@ c1
2
SHOW STATUS LIKE 'Qcache_hits';
Variable_name Value
-Qcache_hits 1
+Qcache_hits 0
DROP TABLE t1;
SET GLOBAL concurrent_insert= @save_concurrent_insert;
SET GLOBAL query_cache_size= default;
@@ -1639,7 +1691,7 @@ a
COMMIT;
SHOW STATUS LIKE 'Qcache_queries_in_cache';
Variable_name Value
-Qcache_queries_in_cache 2
+Qcache_queries_in_cache 0
SHOW STATUS LIKE "Qcache_hits";
Variable_name Value
Qcache_hits 0
@@ -1661,7 +1713,7 @@ a
COMMIT;
SHOW STATUS LIKE "Qcache_hits";
Variable_name Value
-Qcache_hits 2
+Qcache_hits 0
DROP TABLE t1;
SET GLOBAL query_cache_size= default;
End of 5.0 tests