List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:June 22 2011 3:48pm
Subject:bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3315) WL#5569
View as plain text  
#At file:///home/andrei/MySQL/BZR/2a-23May/WL/mysql-next-mr-wl5569/ based on revid:andrei.elkin@stripped

 3315 Andrei Elkin	2011-06-22
      wl#5569 MTS
      
      fixing rpl_parallel_start_stop that failed on Gcov due to wrong calculations
      inside wait_for_slave_param.
      The patch implements the failing multiply operation transparently through SQL.
     @ mysql-test/include/wait_for_slave_param.inc
        Further cleanup in the macro to replace an opaque and possibly creating issues
        builtin "arithmetics" with the correct one of SQL language.
        To prove the waiting interval its start and end timestamps are printed in the error
        branch.
     @ mysql-test/suite/rpl/t/rpl_parallel_start_stop-slave.opt
        Optimizing the test not to wait for less than the innodb default lock timeout (50 secs currently).

    modified:
      mysql-test/include/wait_for_slave_param.inc
      mysql-test/suite/rpl/t/rpl_parallel_start_stop-slave.opt
=== modified file 'mysql-test/include/wait_for_slave_param.inc'
--- a/mysql-test/include/wait_for_slave_param.inc	2011-06-21 15:15:43 +0000
+++ b/mysql-test/include/wait_for_slave_param.inc	2011-06-22 15:48:02 +0000
@@ -49,6 +49,8 @@
 --let $sleep_freq= 10
 --let $sleep_time= `select 1.0 / $sleep_freq`
 
+--let $start_to_wait=`select current_timestamp()`
+
 let $_slave_timeout= $slave_timeout;
 if (!$_slave_timeout)
 {
@@ -80,9 +82,7 @@ if ($_slave_check_configured == 'No such
   --die SHOW SLAVE STATUS returned empty result set. Slave not configured.
 }
 
-# mysqltest doesn't provide any better way to multiply by 10
---let $_wait_for_slave_param_zero= 0
---let $_slave_timeout_counter= $_slave_timeout$zero
+--let $_slave_timeout_counter= `select $_slave_timeout * $sleep_freq`
 --let $_slave_continue= 1
 while ($_slave_continue)
 {
@@ -109,7 +109,9 @@ while ($_slave_continue)
     --dec $_slave_timeout_counter
     if (!$_slave_timeout_counter)
     {
-      --echo **** ERROR: timeout after $_slave_timeout seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value ****
+      --let $end_to_wait=`select current_timestamp()`
+
+      --echo **** ERROR: timeout after $_slave_timeout ($end_to_wait - $start_to_wait) seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value ****
       --source include/show_rpl_debug_info.inc
       --die Timeout in include/wait_for_slave_param.inc
     }

=== modified file 'mysql-test/suite/rpl/t/rpl_parallel_start_stop-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_parallel_start_stop-slave.opt	2010-12-22 19:19:17 +0000
+++ b/mysql-test/suite/rpl/t/rpl_parallel_start_stop-slave.opt	2011-06-22 15:48:02 +0000
@@ -1 +1 @@
---relay-log-info-repository=FILE --slave-transaction-retries=0
+--relay-log-info-repository=FILE --slave-transaction-retries=0 --innodb_lock_wait_timeout=10


Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20110622154802-e5lnh1z7ur2p06m4.bundle
Thread
bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3315) WL#5569Andrei Elkin23 Jun