Debian Codegraph @

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

raw
1 # ==== Purpose ====
2 #
3 # Test verifies that, due to a temporary network error, if request dump
4 # command specific packet write operation fails then the write error gets
5 # handled appropriately. Further retry will be initiated with appropriate
6 # slave registration on master. This will ensure that master has all the
7 # details of slave and no warnings are reported on the master side.
8 #
9 # ==== Implementation ====
10 #
11 # Steps:
12 # 0 - Skip the slave start.
13 # 1 - Enable debug simulation which will simulate packet write error during
14 # dump request command execution.
15 # 2 - Start the slave. Observe that slave is able to reconnect post
16 # temporary network write error.
17 #
18 # ==== References ====
19 #
20 # MDEV-14203: rpl.rpl_extra_col_master_myisam,
21 # rpl.rpl_slave_load_tmpdir_not_exist failed in buildbot with a
22 # warning
23 #
24 # MDEV-13258: rpl.rpl_skip_replication, rpl.rpl_set_statement_default_master
25 # failed in buildbot
26 #
27
28 --source include/have_debug.inc
29 --source include/have_debug_sync.inc
30 --let $rpl_skip_start_slave=1
31 --source include/master-slave.inc
32
33 --disable_query_log
34 call mtr.add_suppression("Could not read packet:.* errno: 11");
35 --enable_query_log
36
37 # Do an insert on master
38 CREATE TABLE t1(a int);
39 INSERT INTO t1 VALUES(1);
40
41 # Add a debug point and start the slave so that dump request fails.
42 connection slave;
43 SET @saved_dbug = @@GLOBAL.debug_dbug;
44 SET @@global.debug_dbug= 'd,simulate_error_on_packet_write';
45
46 START SLAVE;
47 SET DEBUG_SYNC= 'now WAIT_FOR parked';
48 SET @@GLOBAL.debug_dbug = @saved_dbug;
49 SET DEBUG_SYNC= 'now SIGNAL continue';
50
51 # Ensure the last DEBUG_SYNC signal was received by the target thread before
52 # reset; otherwise, the reset can drop the last signal before it gets
53 # acknowledged
54 let $wait_condition= select count(*)=0 from information_schema.processlist where state like "%debug%";
55 source include/wait_condition.inc;
56 SET DEBUG_SYNC= 'RESET';
57
58 --source include/wait_for_slave_io_to_start.inc
59 --source include/wait_for_slave_sql_to_start.inc
60
61 # Sync the slave and verify that slave has caught up with the master.
62 connection master;
63 --source include/sync_slave_sql_with_master.inc
64 SELECT * FROM t1;
65
66 # Cleanup
67 connection master;
68 DROP TABLE t1;
69
70 --source include/rpl_end.inc