Debian Codegraph @

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

raw
1 ################################################################################
2 # Coverage test for WL#9219 Remove cross compatibility code for binlog V1-V3
3 #
4 # It tests two errors on COM_REGISTER_SLAVE command
5 # 1. master_user has no privilege to replicate.
6 # 2. Slave IO thread is killed when registering to master
7 ################################################################################
8 --source include/have_debug.inc
9 --source include/have_binlog_format_row.inc
10 --source include/master-slave.inc
11
12 --echo #
13 --echo # Test Case 1: master_user has no privilege
14 --echo #
15
16 CREATE USER rpl_user;
17
18 --source include/sync_slave_sql_with_master.inc
19 --source include/stop_slave_io.inc
20
21 CHANGE REPLICATION SOURCE TO SOURCE_USER='rpl_user';
22 START SLAVE IO_THREAD;
23
24 --let $slave_io_errno= 13120
25 --source include/wait_for_slave_io_error.inc
26
27 CALL mtr.add_suppression(".*Replica I/O thread couldn't register on source.*");
28 CALL mtr.add_suppression(".* Source command COM_REGISTER_REPLICA failed.*");
29
30 --echo #
31 --echo # Test Case 2: IO thread is killed when registering to master
32 --echo #
33
34 CHANGE REPLICATION SOURCE TO SOURCE_USER='root';
35
36 # Simulate register_slave_to_master is killed
37 SET GLOBAL debug = '+d,simulate_register_replica_killed';
38 START SLAVE IO_THREAD;
39
40 --source include/wait_for_slave_io_to_stop.inc
41 SET GLOBAL debug = '-d,simulate_register_replica_killed';
42 --source include/start_slave_io.inc
43
44 --source include/rpl_connection_master.inc
45 DROP USER rpl_user;
46 --source include/rpl_end.inc