File: rpl_change_master_dbug.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (44 lines) | stat: -rw-r--r-- 1,555 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-- source include/not_group_replication_plugin.inc
# there is no point in running this in more than one binlog format
-- source include/have_binlog_format_row.inc
-- source include/have_debug.inc
-- source include/master-slave.inc

#
# BUG#44209: MASTER_CONNECT_RETRY and --master-retry-count disconnected from each other
#
# BUG#56416
# The test also verifies that the 'Last_IO_Error' entry of SHOW SLAVE STATUS
# will display the number of real retries
#

## Checks that the slave actually gives up after retrying N times, where
## N was set with CHANGE MASTER TO master_retry_count=N

-- connection slave
-- source include/stop_slave.inc
CHANGE REPLICATION SOURCE TO SOURCE_RETRY_COUNT=3, SOURCE_HOST='300.1.1.1', SOURCE_CONNECT_RETRY=1;
START SLAVE io_thread;

# We wait for slave to stop and inspect the number of retries in 
# the error message. Given that we force the slave to always report
# the error with the err_count exported in the retries field, we should
# get 3 retries (one per second) when the IO thread gives up, ie, 
# when it stops.
--let $slave_io_errno= 2005
-- source include/wait_for_slave_io_to_stop.inc
-- let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1)
if (!`SELECT "$error" LIKE "%attempt 3%"`)
{
  -- source include/show_rpl_debug_info.inc
  -- echo Unexpected retry count value! Got: $error
  -- echo Expected number of retries was: 3
  -- die
}

# Clear Slave_IO_Error
RESET SLAVE;
CHANGE REPLICATION SOURCE TO SOURCE_HOST = '127.0.0.1';

--let $rpl_only_running_threads= 1
--source include/rpl_end.inc