summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/rpl_fail_register.test
blob: 5f86a33c9aa5b18449f205bcbeddb0f524a6d853 (plain)
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
source include/have_debug.inc;
source include/have_binlog_format_mixed.inc;
source include/master-slave.inc;

connection slave;
CALL mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: Debug Induced Error");
set @old_dbug=@@global.debug_dbug;
set global debug_dbug='d,fail_com_register_slave';

stop slave;
reset slave;
source include/wait_for_slave_to_stop.inc;
start slave;
# Debug point will raise IO thread error ER_SLAVE_MASTER_COM_FAILURE
# so we will wait for that and manually stop the SQL thread
--let $slave_io_errno= 1597
--source include/wait_for_slave_io_error.inc
--source include/stop_slave_sql.inc
set global debug_dbug=@old_dbug;

connection master;

let $id=`SELECT id from information_schema.processlist where command='Binlog Dump'`;

if ($id) {
  replace_result $id DUMP_THREAD;
  eval kill $id;
  let $wait_condition= SELECT count(*)=0 from information_schema.processlist where command='Killed';
  source include/wait_condition.inc;
}

show slave hosts;

connection slave;
start slave;
source include/rpl_end.inc;