3
3
# Waits until the IO thread of the current connection has got an
4
# error, or until a timeout is reached.
4
# error, or until a timeout is reached. Also waits until the IO
5
# thread has completely stopped.
8
# source include/wait_for_slave_io_error.inc;
10
# Parameters to this macro are $slave_timeout and
11
# $slave_keep_connection. See wait_for_slave_param.inc for
9
# # Wait several errors.
10
# let $slave_io_errno= 1, 2, 3;
11
# source include/wait_for_slave_io_error.inc;
13
# # Print error message
14
# let $slave_io_errno= 1;
15
# let $show_slave_io_error= 1;
16
# source include/wait_for_slave_io_error.inc;
21
# The expected IO error numbers. This is required.
22
# (After BUG#41956 has been fixed, this will be required to be a
23
# symbolic name instead of a numbers.)
25
# $show_slave_io_error
26
# If set, will print the error to the query log.
29
# See wait_for_slave_param.inc for description.
32
# See wait_for_slave_param.inc for description.
34
if (`SELECT '$slave_io_errno' = ''`) {
35
--die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc
14
38
let $old_slave_param_comparison= $slave_param_comparison;
16
39
let $slave_param= Last_IO_Errno;
17
40
let $slave_param_comparison= !=;
18
41
let $slave_param_value= 0;
19
42
let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
20
43
source include/wait_for_slave_param.inc;
21
44
let $slave_error_message= ;
23
45
let $slave_param_comparison= $old_slave_param_comparison;
47
let $_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
48
if (`SELECT $_error NOT IN ($slave_io_errno)`) {
49
--echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) ****
50
source include/show_rpl_debug_info.inc;
51
--echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) ****
52
--die Slave stopped with wrong error code
55
if ($show_slave_io_error)
57
let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1);
58
echo Last_IO_Error = $error;