Debian Codegraph @

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

raw
1 #
2 # MDEV-32551: "Read semi-sync reply magic number error" warnings on master
3 #
4 # Test that changing rpl_semi_sync_master_enabled after startup does not
5 # cause problems with semi-sync cleanup.
6 #
7
8 --source include/have_debug.inc
9 --source include/have_debug_sync.inc
10
11 # Test is binlog format independent, so save resources
12 --source include/have_binlog_format_row.inc
13 --source include/master-slave.inc
14
15 call mtr.add_suppression("Replication event checksum verification failed");
16 call mtr.add_suppression("could not queue event from master");
17 call mtr.add_suppression("Semisync ack receiver.*error reading communication packets");
18 call mtr.add_suppression("Semisync ack receiver got hangup");
19 --sync_slave_with_master
20
21 --echo #
22 --echo # Set up a semisync connection
23 --connection master
24 set @@global.rpl_semi_sync_master_enabled= ON;
25
26 --connection slave
27 stop slave io_thread;
28 set @@global.rpl_semi_sync_slave_enabled= ON;
29 set @old_dbug= @@global.debug_dbug;
30
31 # Force an error to abort out of the main IO thread loop
32 set @@global.debug_dbug= "+d,corrupt_queue_event";
33
34 # Pause the IO thread as soon as the main loop starts. Note we can't use
35 # processlist where "Waiting for master to send event" because the
36 # "corrupt_queue_event" will trigger before we can turn semisync OFF
37 set @@global.debug_dbug= "+d,pause_before_io_read_event";
38
39 # Because the other debug_dbug points are automatically negated when they are
40 # run, and there is a bug that if "-d" takes us to an empty debug string state,
41 # _all_ debug_print statements are output
42 set @@global.debug_dbug= "+d,placeholder";
43
44 start slave io_thread;
45
46 --echo # Disable semi-sync on the slave while the IO thread is active
47 set debug_sync='now wait_for io_thread_at_read_event';
48 set @@global.rpl_semi_sync_slave_enabled= OFF;
49 set debug_sync='now signal io_thread_continue_read_event';
50
51 --echo # Waiting for the slave to stop with the error from corrupt_queue_event
52 --connection slave
53 --let $slave_io_errno= 1595,1743
54 --source include/wait_for_slave_io_error.inc
55
56 --echo # Sleep 1 to give time for Ack_receiver to receive COM_QUIT
57 --sleep 1
58
59 --let $assert_text= Check that there is no 'Read semi-sync reply magic number error' in error log.
60 --let $assert_select=magic number error
61 --let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
62 --let $assert_count= 0
63 --let $assert_only_after=CURRENT_TEST
64 --source include/assert_grep.inc
65
66 --echo #
67 --echo # Cleanup
68 --connection slave
69 --source include/stop_slave.inc
70 set @@global.debug_dbug= @old_dbug;
71 --source include/start_slave.inc
72 --connection master
73 set @@global.rpl_semi_sync_master_enabled= default;
74
75 --source include/rpl_end.inc
76 --echo # End of rpl_semi_sync_slave_enabled_consistent.test