📄 rpl_mystery22.test
字号:
# test case to make slave thread get ahead by 22 bytessource include/master-slave.inc;# first, cause a duplicate key problem on the slavecreate table t1(n int auto_increment primary key);sync_slave_with_master;insert into t1 values (2);connection master;insert into t1 values(NULL);insert into t1 values(NULL);save_master_pos;connection slave;sleep 3; # there is no way around this sleep - we have to wait until# the slave tries to run the query, fails and aborts slave threaddelete from t1 where n = 2;start slave;sync_with_master;#now the buggy slave would be confused on the offset but it can replicate#in order to make it break, we need to stop/start the slave one more timestop slave;connection master;# to be able to really confuse the slave, we need some non-auto-increment# events in the logcreate table t2(n int);drop table t2;insert into t1 values(NULL);save_master_pos;connection slave;start slave;#now the truth comes out - if the slave is buggy, it will never sync because#the slave thread is not able to read eventssync_with_master;select * from t1;#clean upconnection master;drop table t1;sync_slave_with_master;# End of 4.1 tests
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -