List:Commits« Previous MessageNext Message »
From:Dmitry Shulga Date:January 20 2012 10:09am
Subject:bzr push into mysql-5.5 branch (Dmitry.Shulga:3693 to 3694) Bug#13070308
View as plain text  
 3694 Dmitry Shulga	2012-01-20
      Patch for bug#13070308 - VALGRIND failure in XA test.
      
      The issue is that xa.test failed sporadically on some platforms.
      The reason for the test failure is a race condition in xa.test.
      The race condition occures between connection that executes statement
      INSERT INTO t2 SELECT FROM t1 and other connection that tries to run
      statements DELETE FROM t1 and COMMIT. If COMMIT statement had been executed
      before the statement INSERT INTO t2 SELECT FROM t1 was locked by lock
      on table t1 (as a result of query from table t1) then the INSERT statement
      is executed successfully and a following test for deadlock would failed.
      
      This patch fixes this race condition by moving COMMIT statement after commit
      of distributed transaction from concurrent session.

    modified:
      mysql-test/r/xa.result
      mysql-test/t/xa.test
 3693 Nuno Carvalho	2012-01-19
      BUG#13050593 - BACKSLASH SWALLOWED BY INCLUDE/SHOW_SLAVE_STATUS.INC
      
      If an error message contains '\' backslash it is displayed correctly
      through show-slave-status or
      query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);. But when
      SELECT REPLACE(...) is applied backslash is escaped resulting in a
      different test output.
      
      Disabled backslash escape on show_slave_status.inc and replaced '\' for
      '/' using replace_regex function in order to achieve the same test
      output when different path separators are used.

    modified:
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
      mysql-test/include/show_slave_status.inc
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test
      mysql-test/suite/rpl/t/rpl_log_pos.test
      mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
      mysql-test/suite/rpl/t/rpl_packet.test
=== modified file 'mysql-test/r/xa.result'
--- a/mysql-test/r/xa.result	2011-04-14 08:13:28 +0000
+++ b/mysql-test/r/xa.result	2012-01-20 10:03:39 +0000
@@ -206,8 +206,8 @@ DROP TABLE t1;
 #                FAILED 
 #
 DROP TABLE IF EXISTS t1, t2;
-CREATE TABLE t1 (a INT);
-CREATE TABLE t2 (a INT);
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
 START TRANSACTION;
 INSERT INTO t1 VALUES (1);
 # Connection con2
@@ -217,12 +217,14 @@ INSERT INTO t2 SELECT a FROM t1;
 # Connection default
 # Waiting until INSERT ... is blocked
 DELETE FROM t1;
-COMMIT;
 # Connection con2
 # Reaping: INSERT INTO t2 SELECT a FROM t1
 ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
 XA COMMIT 'xid1';
 ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected
+# Connection default
+COMMIT;
+# Connection con2
 XA START 'xid1';
 XA END 'xid1';
 XA PREPARE 'xid1';

=== modified file 'mysql-test/t/xa.test'
--- a/mysql-test/t/xa.test	2011-04-14 08:13:28 +0000
+++ b/mysql-test/t/xa.test	2012-01-20 10:03:39 +0000
@@ -338,8 +338,8 @@ DROP TABLE t1;
 DROP TABLE IF EXISTS t1, t2;
 --enable_warnings
 
-CREATE TABLE t1 (a INT);
-CREATE TABLE t2 (a INT);
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
 
 START TRANSACTION;
 INSERT INTO t1 VALUES (1);
@@ -359,7 +359,6 @@ let $wait_condition=
 --echo # Waiting until INSERT ... is blocked
 --source include/wait_condition.inc
 DELETE FROM t1;
-COMMIT;
 
 --echo # Connection con2
 --connection con2
@@ -368,6 +367,14 @@ COMMIT;
 --reap
 --error ER_XA_RBDEADLOCK
 XA COMMIT 'xid1';
+
+--echo # Connection default
+connection default;
+
+COMMIT;
+
+--echo # Connection con2
+connection con2;
 # This caused the assert to be triggered
 XA START 'xid1';
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (Dmitry.Shulga:3693 to 3694) Bug#13070308Dmitry Shulga20 Jan