List:Commits« Previous MessageNext Message »
From:Serge Kozlov Date:December 7 2008 9:21pm
Subject:bzr commit into mysql-6.0-rpl branch (skozlov:2747) Bug#41186
View as plain text  
#At file:///home/ksm/sun/repo/bug41186/mysql-6.0-rpl/ based on revid:alfranio.correia@stripped

 2747 Serge Kozlov	2008-12-08
      Bug#41186: Possible reason of bug is waiting any sql error on slave instead
      exact number of error. The patch does following:
      1) Add new parameter $slave_sql_errno for wait_for_slave_sql_error.inc
      2) Add waiting error 1062 (Duplicate PK) for slave SQL thread in test case.
modified:
  mysql-test/include/wait_for_slave_sql_error.inc
  mysql-test/suite/rpl/t/rpl_stm_mystery22.test

=== modified file 'mysql-test/include/wait_for_slave_sql_error.inc'
--- a/mysql-test/include/wait_for_slave_sql_error.inc	2008-07-10 16:09:39 +0000
+++ b/mysql-test/include/wait_for_slave_sql_error.inc	2008-12-07 21:20:59 +0000
@@ -7,15 +7,29 @@
 #
 # source include/wait_for_slave_sql_error.inc;
 #
-# Parameters to this macro are $slave_timeout and
-# $slave_keep_connection. See wait_for_slave_param.inc for
-# descriptions.
+# Parameters:
+#
+# $slave_sql_errno
+#   Number of expected SQL error. If it skipped then any error
+#   will pass.
+# 
+# $slave_timeout and
+#   See wait_for_slave_param.inc for descriptions.
+# 
+# $slave_keep_connection. 
+#   See wait_for_slave_param.inc for descriptions.
 
 let $old_slave_param_comparison= $slave_param_comparison;
 
 let $slave_param= Last_SQL_Errno;
 let $slave_param_comparison= !=;
 let $slave_param_value= 0;
+
+if ($slave_sql_errno) {
+  let $slave_param_comparison= =;
+  let $slave_param_value= $slave_sql_errno;
+}
+
 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= ;

=== modified file 'mysql-test/suite/rpl/t/rpl_stm_mystery22.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_mystery22.test	2008-06-22 20:05:19 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_mystery22.test	2008-12-07 21:20:59 +0000
@@ -28,6 +28,7 @@ insert into t1 values(NULL,'new');
 save_master_pos;
 connection slave;
 # wait until the slave tries to run the query, fails and aborts slave thread
+let $slave_sql_errno= 1062;
 source include/wait_for_slave_sql_error.inc;
 select * from t1 order by n;
 delete from t1 where n = 2;

Thread
bzr commit into mysql-6.0-rpl branch (skozlov:2747) Bug#41186Serge Kozlov7 Dec
  • Re: bzr commit into mysql-6.0-rpl branch (skozlov:2747) Bug#41186Luís Soares9 Dec
    • Re: bzr commit into mysql-6.0-rpl branch (skozlov:2747) Bug#41186Serge Kozlov11 Dec
      • Re: bzr commit into mysql-6.0-rpl branch (skozlov:2747) Bug#41186Luís Soares11 Dec