mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
5c78f82915
mysql-test/suite/rpl/r/rpl_flushlog_loop.result: updated result mysql-test/suite/rpl/r/rpl_row_view01.result: updated result mysql-test/suite/rpl/t/rpl_change_master.test: replace sleep mysql-test/suite/rpl/t/rpl_drop_temp.test: replace sleep mysql-test/suite/rpl/t/rpl_flushlog_loop.test: replace sleep mysql-test/suite/rpl/t/rpl_relayspace.test: replace waiting of state to wait_for_slave_param.inc mysql-test/suite/rpl/t/rpl_row_view01.test: replace sleep mysql-test/suite/rpl/t/rpl_trunc_temp.test: replace sleep mysql-test/include/wait_for_binlog_event.inc: New primitive: waiting an event in binlog on master
37 lines
1.2 KiB
Text
37 lines
1.2 KiB
Text
# The slave is started with relay_log_space_limit=10 bytes,
|
|
# to force the deadlock after one event.
|
|
|
|
source include/master-slave.inc;
|
|
connection slave;
|
|
stop slave;
|
|
connection master;
|
|
# This will generate a master's binlog > 10 bytes
|
|
create table t1 (a int);
|
|
drop table t1;
|
|
create table t1 (a int);
|
|
drop table t1;
|
|
connection slave;
|
|
reset slave;
|
|
start slave io_thread;
|
|
# Give the I/O thread time to block.
|
|
let $slave_param= Slave_IO_State;
|
|
let $slave_param_value= Waiting for the slave SQL thread to free enough relay log space;
|
|
source include/wait_for_slave_param.inc;
|
|
|
|
# A bug caused the I/O thread to refuse stopping.
|
|
stop slave io_thread;
|
|
reset slave;
|
|
start slave;
|
|
# The I/O thread stops filling the relay log when
|
|
# it's >10b. And the SQL thread cannot purge this relay log
|
|
# as purge is done only when the SQL thread switches to another
|
|
# relay log, which does not exist here.
|
|
# So we should have a deadlock.
|
|
# if it is not resolved automatically we'll detect
|
|
# it with master_pos_wait that waits for farther than 1Ob;
|
|
# it will timeout after 10 seconds;
|
|
# also the slave will probably not cooperate to shutdown
|
|
# (as 2 threads are locked)
|
|
select master_pos_wait('master-bin.001',200,6)=-1;
|
|
|
|
# End of 4.1 tests
|