3545 Sneha MOdi 2011-11-02 [merge]
Merging from mysql-5.5 -> mysql-trunk
modified:
mysql-test/r/query_cache.result
mysql-test/t/query_cache.test
3544 Marc Alff 2011-11-02
Fixed code review comments.
Table io and table lock events should set the nesting event type and nesting event id
modified:
storage/perfschema/pfs.cc
=== modified file 'mysql-test/r/query_cache.result'
--- a/mysql-test/r/query_cache.result 2011-10-05 13:16:38 +0000
+++ b/mysql-test/r/query_cache.result 2011-11-02 13:28:15 +0000
@@ -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
=== modified file 'mysql-test/t/query_cache.test'
--- a/mysql-test/t/query_cache.test 2011-10-05 13:16:38 +0000
+++ b/mysql-test/t/query_cache.test 2011-11-02 13:28:15 +0000
@@ -1193,47 +1193,48 @@ set global query_cache_type=0;
show status like 'Qcache_free_blocks';
--echo Restore default values.
-# Bug#28211 RENAME DATABASE and query cache don't play nicely together
-#
-# TODO: enable these tests when RENAME DATABASE is implemented.
-# --disable_warnings
-# drop database if exists db1;
-# drop database if exists db2;
-# --enable_warnings
-# 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;
-# show status like 'Qcache_queries_in_cache';
-# rename schema db1 to db2;
-# show status like 'Qcache_queries_in_cache';
-# drop database db2;
-# set global query_cache_size=default;
-#
-# --disable_warnings
-# drop database if exists db1;
-# drop database if exists db3;
-# --enable_warnings
-# 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;
-# select c1+1 from db1.t1;
-# select * from db3.t1;
-# show status like 'Qcache_queries_in_cache';
-# rename schema db1 to db2;
-# show status like 'Qcache_queries_in_cache';
-# drop database db2;
-# drop database db3;
+ --disable_warnings
+ drop database if exists db1;
+ drop database if exists db2;
+ --enable_warnings
+ 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;
+ show status like 'Qcache_queries_in_cache';
+ create database db2;
+ rename table db1.t1 to db2.t2;
+ drop database db1;
+ show status like 'Qcache_queries_in_cache';
+ drop database db2;
+ set global query_cache_size=default;
+
+ --disable_warnings
+ drop database if exists db1;
+ drop database if exists db3;
+ --enable_warnings
+ 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;
+ select c1+1 from db1.t1;
+ select * from db3.t1;
+ show status like 'Qcache_queries_in_cache';
+ create database db2;
+ rename table db1.t1 to db2.t2;
+ drop database db1;
+ show status like 'Qcache_queries_in_cache';
+ drop database db2;
+ drop database db3;
set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (sneha.modi:3544 to 3545) | Sneha MOdi | 7 Nov |