1
# The slave is started with relay_log_space_limit=10 bytes,
2
# to force the deadlock after one event.
4
source include/master-slave.inc;
8
# This will generate a master's binlog > 10 bytes
9
create table t1 (a int);
11
create table t1 (a int);
15
start slave io_thread;
16
# Give the I/O thread time to block.
17
let $slave_param= Slave_IO_State;
18
let $slave_param_value= Waiting for the slave SQL thread to free enough relay log space;
19
source include/wait_for_slave_param.inc;
21
# A bug caused the I/O thread to refuse stopping.
25
# The I/O thread stops filling the relay log when
26
# it's >10b. And the SQL thread cannot purge this relay log
27
# as purge is done only when the SQL thread switches to another
28
# relay log, which does not exist here.
29
# So we should have a deadlock.
30
# if it is not resolved automatically we'll detect
31
# it with master_pos_wait that waits for farther than 1Ob;
32
# it will timeout after 10 seconds;
33
# also the slave will probably not cooperate to shutdown
34
# (as 2 threads are locked)
35
select master_pos_wait('master-bin.001',200,6)=-1;