diff options
author | unknown <Li-Bing.Song@sun.com> | 2010-05-28 10:57:45 +0800 |
---|---|---|
committer | unknown <Li-Bing.Song@sun.com> | 2010-05-28 10:57:45 +0800 |
commit | 3df7f6749a7448a0a55c4b122d2b921f652360dd (patch) | |
tree | 160dc24431167e37c2ede43534e04bcb6ae4d315 /mysql-test/include/wait_for_slave_io_error.inc | |
parent | 0a35e5bd18951a59aec6977a7a1f34d87c10ca88 (diff) | |
download | mariadb-git-3df7f6749a7448a0a55c4b122d2b921f652360dd.tar.gz |
Postfix for BUG#49741
Add code to waiting for a set of errors.
Add code to waiting for an error instead of waiting for io thread to stop, as
after 'START SLAVE', the status of io thread is still not running.
But it doesn't mean slave io thread encounters an error.
Diffstat (limited to 'mysql-test/include/wait_for_slave_io_error.inc')
-rw-r--r-- | mysql-test/include/wait_for_slave_io_error.inc | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/mysql-test/include/wait_for_slave_io_error.inc b/mysql-test/include/wait_for_slave_io_error.inc index 101df69730c..34cbf20a73b 100644 --- a/mysql-test/include/wait_for_slave_io_error.inc +++ b/mysql-test/include/wait_for_slave_io_error.inc @@ -6,14 +6,21 @@ # # ==== Usage ==== # +# # Wait several errors. +# let $slave_io_errno= 1, 2, 3; +# source include/wait_for_slave_io_error.inc; +# +# # Print error message +# let $slave_io_errno= 1; +# let $show_slave_io_error= 1; # source include/wait_for_slave_io_error.inc; # # Parameters: # # $slave_io_errno -# The expected IO error number. This is required. +# The expected IO error numbers. This is required. # (After BUG#41956 has been fixed, this will be required to be a -# symbolic name instead of a number.) +# symbolic name instead of a numbers.) # # $show_slave_io_error # If set, will print the error to the query log. @@ -28,13 +35,17 @@ if (`SELECT '$slave_io_errno' = ''`) { --die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc } -let $slave_param= Slave_IO_Running; -let $slave_param_value= No; -let $slave_error_message= Failed while waiting for slave to stop the IO thread (expecting error in the IO thread); +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; let $_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); -if (`SELECT '$_error' != '$slave_io_errno'`) { +if (`SELECT $_error NOT IN ($slave_io_errno)`) { --echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) **** source include/show_rpl_debug_info.inc; --echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) **** |