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
6
-- source include/have_binlog_format_row.inc
7
-- source include/master-slave.inc
9
# first, cause a duplicate key problem on the slave
10
create table t1(n int auto_increment primary key, s char(10));
11
sync_slave_with_master;
13
# bug#31552/31609 idempotency is not default any longer
14
# so that the declared in heading comments aim of the test
15
# should be backed up with explicit setting of the slave mode
16
set @@global.slave_exec_mode= 'IDEMPOTENT';
18
insert into t1 values (2,'old');
20
insert into t1 values(NULL,'new');
21
insert into t1 values(NULL,'new');
25
select * from t1 order by n;
26
delete from t1 where n = 2;
33
create table t2(n int);
35
insert into t1 values(NULL,'new');
36
# what happens when we delete a row which does not exist on slave?
38
insert into t1 values(NULL,'new');
40
delete from t1 where n=4;
47
select * from t1 order by n;
51
sync_slave_with_master;
52
set @@global.slave_exec_mode= default;