#At file:///home/andrei/MySQL/BZR/2a-23May/WL/mysql-next-mr-wl5569/ based on revid:alfranio.correia@stripped
3313 Andrei Elkin 2011-06-21
wl#5569 MTS
rpl_parallel_start_stop.test could fail sporadicaly with timeout.
@ mysql-test/include/wait_for_slave_param.inc
Correcting comments and handling of passed by caller $slave_timeout to make sure
the unit of 1 second really holds.
Introduced symbolic default_timeout, sleep_freq(uency) to procude time to sleep in between of
two polls.
@ mysql-test/suite/rpl/t/rpl_parallel_start_stop.test
Since the default time to wait is less than one for innodb's wait for lock,
the time to wait for error is set explicitly.
modified:
mysql-test/include/wait_for_slave_param.inc
mysql-test/suite/rpl/t/rpl_parallel_start_stop.test
=== modified file 'mysql-test/include/wait_for_slave_param.inc'
--- a/mysql-test/include/wait_for_slave_param.inc 2010-12-20 14:57:35 +0000
+++ b/mysql-test/include/wait_for_slave_param.inc 2011-06-21 15:15:43 +0000
@@ -29,8 +29,8 @@
# --let $slave_param_comparison= !=
#
# $slave_timeout
-# The default timeout is 5 minutes. You can change the timeout by
-# setting $slave_timeout. The unit is seconds.
+# The default timeout is $default_timeout seconds. You can change the timeout by
+# setting $slave_timeout. The unit is one second.
#
# $slave_error_param
# If set, this script will check if the column of the output from
@@ -45,11 +45,14 @@
--let $include_filename= wait_for_slave_param.inc [$slave_param]
--source include/begin_include_file.inc
+--let $default_timeout= 30
+--let $sleep_freq= 10
+--let $sleep_time= `select 1.0 / $sleep_freq`
let $_slave_timeout= $slave_timeout;
if (!$_slave_timeout)
{
- let $_slave_timeout= 300;
+ let $_slave_timeout= `select $default_timeout * $sleep_freq`;
}
if ($slave_error_param == '')
@@ -110,7 +113,7 @@ while ($_slave_continue)
--source include/show_rpl_debug_info.inc
--die Timeout in include/wait_for_slave_param.inc
}
- --sleep 0.1
+ --sleep $sleep_time
}
}
=== modified file 'mysql-test/suite/rpl/t/rpl_parallel_start_stop.test'
--- a/mysql-test/suite/rpl/t/rpl_parallel_start_stop.test 2011-06-20 13:26:35 +0000
+++ b/mysql-test/suite/rpl/t/rpl_parallel_start_stop.test 2011-06-21 15:15:43 +0000
@@ -169,6 +169,9 @@ update t1 set a=21 where a=2;
# slave is stopped
+# setting timeout to be as twice as greater than innodb's.
+--let $slave_timeout=`select 2*@@global.innodb_lock_wait_timeout`
+
let $slave_sql_errno= 1213, 1205;
source include/wait_for_slave_sql_error.inc;
Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20110621151543-r31p36ndm4odby1u.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3313) WL#5569 | Andrei Elkin | 21 Jun |