List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:June 10 2011 8:44am
Subject:bzr commit into mysql-5.5 branch (jon.hauglid:3440) Bug#12584161
View as plain text  
#At file:///export/home/x/mysql-5.5-bug12584161/ based on revid:dmitry.shulga@stripped

 3440 Jon Olav Hauglid	2011-06-10
      Bug#12584161 - 43861: MAIN.QUERY_CACHE_28249 FAILS SPORADICALLY
      
      This test case was failing on 5.5 and trunk for two reasons.
      1) It waited for the "Waiting for table level lock" process
         state while this state was renamed "Waiting for table
         metadata lock" with the introduction of MDL in 5.5.
      2) SET GLOBAL query_cache_size= 100000; gave a warning since
         query_cache_size is supposed to be multiples of 1024.
      
      This patch fixes these two issues and re-enables the test case.

    modified:
      mysql-test/r/query_cache_28249.result
      mysql-test/t/disabled.def
      mysql-test/t/query_cache_28249.test
=== modified file 'mysql-test/r/query_cache_28249.result'
--- a/mysql-test/r/query_cache_28249.result	2008-11-28 15:45:34 +0000
+++ b/mysql-test/r/query_cache_28249.result	2011-06-10 08:44:42 +0000
@@ -8,7 +8,7 @@ SET @query_cache_size=         @@global.
 SET GLOBAL query_cache_type=1;
 SET GLOBAL query_cache_limit=10000;
 SET GLOBAL query_cache_min_res_unit=0;
-SET GLOBAL query_cache_size= 100000;
+SET GLOBAL query_cache_size= 102400;
 FLUSH TABLES;
 DROP TABLE IF EXISTS t1, t2;
 CREATE TABLE t1 (a INT);
@@ -23,10 +23,10 @@ SELECT *, (SELECT COUNT(*) FROM t2) FROM
 # Switch to connection user3
 # Poll till the select of connection user1 is blocked by the write lock on t1.
 SELECT user,command,state,info FROM information_schema.processlist
-WHERE state = 'Locked'
+WHERE state = 'Waiting for table metadata lock'
   AND info = 'SELECT *, (SELECT COUNT(*) FROM t2) FROM t1';
 user	command	state	info
-root	Query	Locked	SELECT *, (SELECT COUNT(*) FROM t2) FROM t1
+root	Query	Waiting for table metadata lock	SELECT *, (SELECT COUNT(*) FROM t2) FROM t1
 INSERT INTO t1 VALUES (4);
 # Switch to connection user2
 UNLOCK TABLES;

=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	2011-06-06 10:24:28 +0000
+++ b/mysql-test/t/disabled.def	2011-06-10 08:44:42 +0000
@@ -15,5 +15,4 @@ sum_distinct-big         : Bug#11764126
 alter_table-big          : Bug#11748731 2010-11-15 mattiasj was not tested
 create-big               : Bug#11748731 2010-11-15 mattiasj was not tested
 archive-big              : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc
-main.query_cache_28249   : Bug#12584161 2009-03-25 main.query_cache_28249 fails sporadically
 log_tables-big           : Bug#11756699 2010-11-15 mattiasj report already exists

=== modified file 'mysql-test/t/query_cache_28249.test'
--- a/mysql-test/t/query_cache_28249.test	2010-08-06 11:29:37 +0000
+++ b/mysql-test/t/query_cache_28249.test	2011-06-10 08:44:42 +0000
@@ -30,7 +30,7 @@ connection user1;
 SET GLOBAL query_cache_type=1;
 SET GLOBAL query_cache_limit=10000;
 SET GLOBAL query_cache_min_res_unit=0;
-SET GLOBAL query_cache_size= 100000;
+SET GLOBAL query_cache_size= 102400;
 
 FLUSH TABLES;
 --disable_warnings
@@ -58,18 +58,18 @@ connection user3;
 # Typical information_schema.processlist content after sufficient sleep time
 #   ID  USER  COMMAND  TIME  STATE   INFO
 #   ....
-#   2   root  Query       5  Waiting for table level lock  SELECT *, (SELECT COUNT(*) FROM t2) FROM t1
+#   2   root  Query       5  Waiting for table metadata lock  SELECT *, (SELECT COUNT(*) FROM t2) FROM t1
 #   ....
 #                            XXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 # The values marked with 'X' must be reached.
 --echo # Poll till the select of connection user1 is blocked by the write lock on t1.
 let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist
-WHERE state = 'Waiting for table level lock'
+WHERE state = 'Waiting for table metadata lock'
   AND info = '$select_for_qc';
 --source include/wait_condition.inc
 eval
 SELECT user,command,state,info FROM information_schema.processlist
-WHERE state = 'Waiting for table level lock'
+WHERE state = 'Waiting for table metadata lock'
   AND info = '$select_for_qc';
 INSERT INTO t1 VALUES (4);
 


Attachment: [text/bzr-bundle] bzr/jon.hauglid@oracle.com-20110610084442-vggyxybi00ehzxcw.bundle
Thread
bzr commit into mysql-5.5 branch (jon.hauglid:3440) Bug#12584161Jon Olav Hauglid10 Jun