List:Commits« Previous MessageNext Message »
From:Luis Soares Date:June 26 2009 11:05am
Subject:bzr commit into mysql-5.1-bugteam branch (luis.soares:2980) Bug#44270
View as plain text  
#At file:///home/lsoares/Workspace/mysql-server/bugfix/b44270/5.1-bt-push/ based on revid:luis.soares@stripped

 2980 Luis Soares	2009-06-26
      BUG#44270: Post-push fix
      
      The test case added failed sporadically on PB. This is due to the
      fact that the user thread in some cases is waiting for slave IO
      to stop and then check the error number. Thence, sometimes the
      user thread would race for the error number with IO thread.
      
      This post push fix addresses this by replacing the wait for slave
      io to stop with a wait for slave io error (as it seems it was
      added in 6.0 also after patch on which this is based was
      pushed). This implied backporting wait_for_slave_io_error.inc
      from 6.0 also.

    added:
      mysql-test/include/wait_for_slave_io_error.inc
    modified:
      mysql-test/extra/rpl_tests/rpl_reset_slave.test
=== modified file 'mysql-test/extra/rpl_tests/rpl_reset_slave.test'
--- a/mysql-test/extra/rpl_tests/rpl_reset_slave.test	2009-06-03 14:14:18 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_reset_slave.test	2009-06-26 11:05:56 +0000
@@ -58,7 +58,7 @@ echo *** errno must be zero: $last_io_er
 
 change master to master_user='impossible_user_name';
 start slave;
-source include/wait_for_slave_io_to_stop.inc;
+source include/wait_for_slave_io_error.inc;
 let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
 --disable_query_log
 eval SELECT $last_io_errno > 0 as ONE;
@@ -79,7 +79,7 @@ let $last_io_error= query_get_value(SHOW
 source include/stop_slave.inc;
 change master to master_user='impossible_user_name';
 start slave;
-source include/wait_for_slave_io_to_stop.inc;
+source include/wait_for_slave_io_error.inc;
 let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
 --disable_query_log
 eval SELECT $last_io_errno > 0 as ONE;

=== added file 'mysql-test/include/wait_for_slave_io_error.inc'
--- a/mysql-test/include/wait_for_slave_io_error.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/wait_for_slave_io_error.inc	2009-06-26 11:05:56 +0000
@@ -0,0 +1,23 @@
+# ==== Purpose ====
+#
+# Waits until the IO thread of the current connection has got an
+# error, or until a timeout is reached.
+#
+# ==== Usage ====
+#
+# source include/wait_for_slave_io_error.inc;
+#
+# Parameters to this macro are $slave_timeout and
+# $slave_keep_connection. See wait_for_slave_param.inc for
+# descriptions.
+
+let $old_slave_param_comparison= $slave_param_comparison;
+
+let $slave_param= Last_IO_Errno;
+let $slave_param_comparison= !=;
+let $slave_param_value= 0;
+let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
+source include/wait_for_slave_param.inc;
+let $slave_error_message= ;
+
+let $slave_param_comparison= $old_slave_param_comparison;


Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20090626110556-4xkal3zn6l192ytc.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (luis.soares:2980) Bug#44270Luis Soares26 Jun