mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Automerge: mysql-5.1-bugteam bug branch --> mysql-5.1-bugteam latest.
This commit is contained in:
18
mysql-test/suite/rpl/r/rpl_stm_sql_mode.result
Normal file
18
mysql-test/suite/rpl/r/rpl_stm_sql_mode.result
Normal file
@ -0,0 +1,18 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (pk integer auto_increment , primary key (pk));
|
||||
SET SESSION SQL_MODE='traditional';
|
||||
# **** [MASTER] *****
|
||||
# action: raise DUP KEY error (error code should be set in the
|
||||
# query log event)
|
||||
INSERT INTO t1 (`pk`) VALUES (1), (1);
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
DROP TABLE t1;
|
||||
# **** [ sync slave with master ] ****
|
||||
# assertion: sync slave with master makes slave not to stop with
|
||||
# duplicate key error (because it has received event
|
||||
# with expected error code).
|
24
mysql-test/suite/rpl/t/rpl_stm_sql_mode.test
Normal file
24
mysql-test/suite/rpl/t/rpl_stm_sql_mode.test
Normal file
@ -0,0 +1,24 @@
|
||||
-- source include/master-slave.inc
|
||||
-- source include/have_binlog_format_statement.inc
|
||||
|
||||
#
|
||||
# Bug #51055 Replication failure on duplicate key + traditional SQL mode
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (pk integer auto_increment , primary key (pk));
|
||||
|
||||
SET SESSION SQL_MODE='traditional';
|
||||
|
||||
-- echo # **** [MASTER] *****
|
||||
-- echo # action: raise DUP KEY error (error code should be set in the
|
||||
-- echo # query log event)
|
||||
-- error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (`pk`) VALUES (1), (1);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
-- echo # **** [ sync slave with master ] ****
|
||||
-- echo # assertion: sync slave with master makes slave not to stop with
|
||||
-- echo # duplicate key error (because it has received event
|
||||
-- echo # with expected error code).
|
||||
-- sync_slave_with_master
|
Reference in New Issue
Block a user