List:Commits« Previous MessageNext Message »
From:Luis Soares Date:May 29 2009 11:11am
Subject:bzr commit into mysql-6.0-rpl branch (luis.soares:2858) Bug#44938
View as plain text  
#At file:///home/lsoares/Workspace/mysql-server/bugfix/b44938/6.0-rpl/ based on revid:zhenxing.he@stripped

 2858 Luis Soares	2009-05-29
      BUG#44938: Replication fails when optimizing a table used by pending
      transaction.
      
      The original version of rpl_failed_optimize checked that a failed
      optimize operation would not harm replication. It performed two
      checks:
       
        1. Check that failed optimize operations due to timeout (in this
           case, because it is optimizing a currently used table in other
           session), will not harm replication.
      
           After patch for BUG#989 was pushed, the test hangs here, due to
           meta data locks - optimize will block on mdl lock instead of
           innodb lock, causing the test operations on the other session not
           to execute. Consequently, the entire test hangs.
      
        2. Check that optimizing a non-existing table will not harm
           replication. 
      
      Due to the change in behavior introduced by patch for BUG#989, this
      fix addresses the blocking issue by removing item 1.
     @ mysql-test/extra/rpl_tests/rpl_failed_optimize.test
        Removed the blocking part of the test that has become deprecated after
        a change in behavior introduced by patch for BUG#989.
     @ mysql-test/suite/rpl/r/rpl_failed_optimize.result
        Updated the result file.
     @ mysql-test/suite/rpl/t/disabled.def
        Reenabled the test case.
     @ mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt
        This server option does not make sense anymore after removal in the
        test case of the concurrent optimize.

    removed:
      mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt
    modified:
      mysql-test/extra/rpl_tests/rpl_failed_optimize.test
      mysql-test/suite/rpl/r/rpl_failed_optimize.result
      mysql-test/suite/rpl/t/disabled.def
=== modified file 'mysql-test/extra/rpl_tests/rpl_failed_optimize.test'
--- a/mysql-test/extra/rpl_tests/rpl_failed_optimize.test	2006-05-05 17:08:40 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_failed_optimize.test	2009-05-29 11:11:52 +0000
@@ -2,22 +2,24 @@
 
 #
 # BUG#5551 "Failed OPTIMIZE TABLE is logged to binary log"
-# Replication should work when OPTIMIZE TABLE timeouts, and 
-# when OPTIMIZE TABLE is executed on a non-existing table
+# Replication should work when when OPTIMIZE TABLE is 
+# executed on a non-existing table.
 #
+# Due to patch for BUG#989, checking that an OPTIMIZE
+# that fails due to a lock wait timeout on an InnoDB table
+# is not valid anymore, as an mdl lock is hit before,
+# thence no timeout occurs, but instead a deadlock.
+#
+
 
 eval CREATE TABLE t1 ( a int ) ENGINE=$engine_type;
 BEGIN;
 INSERT INTO t1 VALUES (1);
 
 connection master1;
-OPTIMIZE TABLE t1;
-
 OPTIMIZE TABLE non_existing;  
 sync_slave_with_master;
 
-# End of 4.1 tests
-
 connection master;
 select * from t1;
 commit;

=== modified file 'mysql-test/suite/rpl/r/rpl_failed_optimize.result'
--- a/mysql-test/suite/rpl/r/rpl_failed_optimize.result	2009-02-27 15:06:23 +0000
+++ b/mysql-test/suite/rpl/r/rpl_failed_optimize.result	2009-05-29 11:11:52 +0000
@@ -7,13 +7,6 @@ start slave;
 CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
 BEGIN;
 INSERT INTO t1 VALUES (1);
-OPTIMIZE TABLE t1;
-Table	Op	Msg_type	Msg_text
-test.t1	optimize	note	Table does not support optimize, doing recreate + analyze instead
-test.t1	optimize	error	Lock wait timeout exceeded; try restarting transaction
-test.t1	optimize	status	Operation failed
-Warnings:
-Error	1205	Lock wait timeout exceeded; try restarting transaction
 OPTIMIZE TABLE non_existing;
 Table	Op	Msg_type	Msg_text
 test.non_existing	optimize	Error	Table 'test.non_existing' doesn't exist

=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def	2009-05-12 08:58:44 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def	2009-05-29 11:11:52 +0000
@@ -17,5 +17,4 @@ rpl_extraCol_falcon        : Bug#40930 2
 rpl_cross_version          : Bug#42311 2009-01-23 aelkin
 rpl_heartbeat_basic        : Bug#43828 Sporadic failures (Serge.Kozlov@stripped)
 rpl_heartbeat_2slaves      : Bug#43828 Sporadic failures (Serge.Kozlov@stripped)
-rpl_failed_optimize        : WL#4284: Can't optimize table used by a pending transaction (there is metadata lock on the table).
 rpl_read_only              : WL#4284: Setting Read only won't succeed until all metadata locks are released.

=== removed file 'mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---loose-innodb-lock-wait-timeout=1


Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20090529111152-yhht2hw6273g47mf.bundle
Thread
bzr commit into mysql-6.0-rpl branch (luis.soares:2858) Bug#44938Luis Soares29 May