Debian Codegraph @

mysql-test/suite/rpl/t/rpl_change_master_dbug.test

raw
1 -- source include/not_group_replication_plugin.inc
2 # there is no point in running this in more than one binlog format
3 -- source include/have_binlog_format_row.inc
4 -- source include/have_debug.inc
5 -- source include/master-slave.inc
6
7 #
8 # BUG#44209: MASTER_CONNECT_RETRY and --master-retry-count disconnected from each other
9 #
10 # BUG#56416
11 # The test also verifies that the 'Last_IO_Error' entry of SHOW SLAVE STATUS
12 # will display the number of real retries
13 #
14
15 ## Checks that the slave actually gives up after retrying N times, where
16 ## N was set with CHANGE MASTER TO master_retry_count=N
17
18 -- connection slave
19 -- source include/stop_slave.inc
20 CHANGE REPLICATION SOURCE TO SOURCE_RETRY_COUNT=3, SOURCE_HOST='300.1.1.1', SOURCE_CONNECT_RETRY=1;
21 START SLAVE io_thread;
22
23 # We wait for slave to stop and inspect the number of retries in
24 # the error message. Given that we force the slave to always report
25 # the error with the err_count exported in the retries field, we should
26 # get 3 retries (one per second) when the IO thread gives up, ie,
27 # when it stops.
28 --let $slave_io_errno= 2005
29 -- source include/wait_for_slave_io_to_stop.inc
30 -- let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1)
31 if (!`SELECT "$error" LIKE "%attempt 3%"`)
32 {
33 -- source include/show_rpl_debug_info.inc
34 -- echo Unexpected retry count value! Got: $error
35 -- echo Expected number of retries was: 3
36 -- die
37 }
38
39 # Clear Slave_IO_Error
40 RESET SLAVE;
41 CHANGE REPLICATION SOURCE TO SOURCE_HOST = '127.0.0.1';
42
43 --let $rpl_only_running_threads= 1
44 --source include/rpl_end.inc