1
# Originally taken from rpl_mystery22.test,
2
# but this row-based-replication test has a totally different spirit:
3
# slave will not stop because of dup key,
4
# instead we test if it does overwrite the dup key
7
# first, cause a duplicate key problem on the slave
8
create table t1(n int auto_increment primary key, s char(10));
9
sync_slave_with_master;
11
# bug#31552/31609 idempotency is not default any longer
12
# so that the declared in heading comments aim of the test
13
# should be backed up with explicit setting of the slave mode
14
set @@global.slave_exec_mode= 'IDEMPOTENT';
16
insert into t1 values (2,'old');
18
insert into t1 values(NULL,'new');
19
insert into t1 values(NULL,'new');
23
select * from t1 order by n;
24
delete from t1 where n = 2;
31
create table t2(n int);
33
insert into t1 values(NULL,'new');
34
# what happens when we delete a row which does not exist on slave?
36
insert into t1 values(NULL,'new');
38
delete from t1 where n=4;
45
select * from t1 order by n;
49
sync_slave_with_master;
50
set @@global.slave_exec_mode= default;