Debian Codegraph @

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

raw
1 # Test for
2 # Bug #33931 assertion at write_ignored_events_info_to_relay_log if init_replica_thread() fails
3 # Bug #33932 assertion at handle_slave_sql if init_replica_thread() fails
4
5 --source include/not_group_replication_plugin.inc
6 source include/have_debug.inc;
7 source include/master-slave.inc;
8
9 connection slave;
10
11 # Add suppression for expected warnings in slaves error log
12 call mtr.add_suppression("Failed during replica I/O thread initialization");
13 call mtr.add_suppression("Replica SQL.*Failed during replica thread initialization.* MY-013117");
14
15 --source include/stop_slave.inc
16 reset slave;
17
18 # Set debug flags on slave to force errors to occur
19 --let $debug_point= simulate_io_replica_error_on_init
20 --source include/add_debug_point.inc
21 --let $debug_point= simulate_sql_replica_error_on_init
22 --source include/add_debug_point.inc
23
24 --disable_query_log
25 --replace_regex /[0-9]{4}/####/
26 eval CHANGE REPLICATION SOURCE TO SOURCE_USER='root',
27 SOURCE_CONNECT_RETRY=1,
28 SOURCE_HOST='127.0.0.1',
29 SOURCE_PORT=$MASTER_MYPORT;
30 --enable_query_log
31
32 start slave;
33
34 #
35 # slave is going to stop because of emulated failures
36 # but there won't be any crashes nor asserts hit.
37 #
38
39 # Wait for the SQL thread error
40 --let $slave_sql_errno= convert_error(ER_REPLICA_FATAL_ERROR)
41 --let $show_slave_sql_error= 1
42 --source include/wait_for_slave_sql_error.inc
43
44 # Wait for the I/O thread error
45 --let $slave_io_errno= convert_error(ER_REPLICA_FATAL_ERROR)
46 --let $show_slave_io_error= 1
47 --source include/wait_for_slave_io_error.inc
48 #
49 # Cleanup
50 #
51 --let $debug_point= simulate_io_replica_error_on_init
52 --source include/remove_debug_point.inc
53 --let $debug_point= simulate_sql_replica_error_on_init
54 --source include/remove_debug_point.inc
55
56 # Clear Last_SQL_Error and Last_IO_Error
57 RESET SLAVE;
58
59 --let $rpl_only_running_threads= 1
60 --source include/rpl_end.inc