mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
678116f8aa
Test cleanip per lars .del-rpl_row_sp000.result~2b24650b123e20a9: Delete: mysql-test/r/rpl_row_sp000.result .del-rpl_row_sp000.test~645e2807516682b6: Delete: mysql-test/t/rpl_row_sp000.test .del-rpl_row_sp000-slave.opt~d84baa1f59616d77: Delete: mysql-test/t/rpl_row_sp000-slave.opt .del-rpl_row_sp000-master.opt~da625c0a51a2f08a: Delete: mysql-test/t/rpl_row_sp000-master.opt rpl_sp.result: Rename: mysql-test/r/rpl_stm_sp.result -> mysql-test/r/rpl_sp.result rpl_sp-master.opt: Rename: mysql-test/t/rpl_stm_sp-master.opt -> mysql-test/t/rpl_sp-master.opt rpl_sp-slave.opt: Rename: mysql-test/t/rpl_stm_sp-slave.opt -> mysql-test/t/rpl_sp-slave.opt rpl_sp.test: Rename: mysql-test/t/rpl_stm_sp.test -> mysql-test/t/rpl_sp.test mysql-test/t/rpl_sp-slave.opt: Rename: mysql-test/t/rpl_stm_sp-slave.opt -> mysql-test/t/rpl_sp-slave.opt mysql-test/t/rpl_sp-master.opt: Rename: mysql-test/t/rpl_stm_sp-master.opt -> mysql-test/t/rpl_sp-master.opt mysql-test/r/rpl_sp.result: Rename: mysql-test/r/rpl_stm_sp.result -> mysql-test/r/rpl_sp.result BitKeeper/deleted/.del-rpl_row_sp000-master.opt~da625c0a51a2f08a: Delete: mysql-test/t/rpl_row_sp000-master.opt BitKeeper/deleted/.del-rpl_row_sp000-slave.opt~d84baa1f59616d77: Delete: mysql-test/t/rpl_row_sp000-slave.opt BitKeeper/deleted/.del-rpl_row_sp000.test~645e2807516682b6: Delete: mysql-test/t/rpl_row_sp000.test BitKeeper/deleted/.del-rpl_row_sp000.result~2b24650b123e20a9: Delete: mysql-test/r/rpl_row_sp000.result mysql-test/t/rpl_stm_mystery22.test: Test cleanip per lars mysql-test/t/disabled.def: Test cleanip per lars mysql-test/t/rpl_sp.test: Test cleanip per lars
66 lines
2.1 KiB
Text
66 lines
2.1 KiB
Text
################################
|
|
# Change Author: JBM
|
|
# Change Date: 2006-01-12
|
|
# Change: Added back have stm binlog
|
|
# and added requirments comments
|
|
################################
|
|
# test case to make slave thread get ahead by 22 bytes
|
|
################################
|
|
#REQUIREMENT: If there is a faked slave duplicate key insert
|
|
#error and the slave is restarted, the replication should
|
|
#proceed in a correct way.
|
|
################################
|
|
#REQUIREMENT: If there is a faked slave non-existing record
|
|
#delete error and the slave is restarted, then the replication
|
|
#should proceed in a correct way.
|
|
#################################
|
|
|
|
-- source include/have_binlog_format_statement.inc
|
|
-- source include/master-slave.inc
|
|
|
|
# first, cause a duplicate key problem on the slave
|
|
create table t1(n int auto_increment primary key, s char(10));
|
|
sync_slave_with_master;
|
|
insert into t1 values (2,'old');
|
|
connection master;
|
|
insert into t1 values(NULL,'new');
|
|
insert into t1 values(NULL,'new');
|
|
save_master_pos;
|
|
connection slave;
|
|
# wait until the slave tries to run the query, fails and aborts slave thread
|
|
wait_for_slave_to_stop;
|
|
select * from t1 order by n;
|
|
delete from t1 where n = 2;
|
|
--disable_warnings
|
|
start slave;
|
|
--enable_warnings
|
|
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 time
|
|
stop slave;
|
|
connection master;
|
|
# to be able to really confuse the slave, we need some non-auto-increment
|
|
# events in the log
|
|
create table t2(n int);
|
|
drop table t2;
|
|
insert into t1 values(NULL,'new');
|
|
# what happens when we delete a row which does not exist on slave?
|
|
set sql_log_bin=0;
|
|
insert into t1 values(NULL,'new');
|
|
set sql_log_bin=1;
|
|
delete from t1 where n=4;
|
|
save_master_pos;
|
|
connection slave;
|
|
--disable_warnings
|
|
start slave;
|
|
--enable_warnings
|
|
#now the truth comes out - if the slave is buggy, it will never sync because
|
|
#the slave thread is not able to read events
|
|
sync_with_master;
|
|
select * from t1 order by n;
|
|
#clean up
|
|
connection master;
|
|
drop table t1;
|
|
sync_slave_with_master;
|
|
|
|
# End of 4.1 tests
|