mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / engines / funcs / t / rpl_relayspace.test
blob70315c14f341b05f7c6dd4a3834fd5b348549483
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;
5 connection slave;
6 stop slave;
7 connection master;
8 # This will generate a master's binlog > 10 bytes
9 create table t1 (a int);
10 drop table t1;
11 create table t1 (a int);
12 drop table t1;
13 connection slave;
14 reset slave;
15 start slave io_thread;
16 # Give the I/O thread time to block.
17 sleep 2;
18 # A bug caused the I/O thread to refuse stopping.
19 stop slave io_thread;
20 reset slave;
21 start slave;
22 # The I/O thread stops filling the relay log when
23 # it's >10b. And the SQL thread cannot purge this relay log
24 # as purge is done only when the SQL thread switches to another
25 # relay log, which does not exist here.
26 # So we should have a deadlock.
27 # if it is not resolved automatically we'll detect
28 # it with master_pos_wait that waits for farther than 1Ob;
29 # it will timeout after 10 seconds;
30 # also the slave will probably not cooperate to shutdown
31 # (as 2 threads are locked)
32 select master_pos_wait('master-bin.001',200,6)=-1;
34 # End of 4.1 tests