Debian Codegraph @

mysql-test/suite/rpl/t/rpl_stm_sql_mode.test

raw
1 -- source include/not_group_replication_plugin.inc
2 -- source include/have_binlog_format_statement.inc
3 -- source include/master-slave.inc
4
5 #
6 # Bug #51055 Replication failure on duplicate key + traditional SQL mode
7 #
8
9 CREATE TABLE t1 (pk integer auto_increment , primary key (pk));
10
11 SET SESSION SQL_MODE='traditional';
12
13 -- echo # **** [MASTER] *****
14 -- echo # action: raise DUP KEY error (error code should be set in the
15 -- echo # query log event)
16 -- error ER_DUP_ENTRY
17 INSERT INTO t1 (`pk`) VALUES (1), (1);
18
19 DROP TABLE t1;
20
21 -- echo # **** [ sync slave with master ] ****
22 -- echo # assertion: sync slave with master makes slave not to stop with
23 -- echo # duplicate key error (because it has received event
24 -- echo # with expected error code).
25 --source include/sync_slave_sql_with_master.inc
26 --source include/rpl_end.inc