diff options
Diffstat (limited to 'mysql-test/suite/sql_sequence/replication_mixed.test')
-rw-r--r-- | mysql-test/suite/sql_sequence/replication_mixed.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/suite/sql_sequence/replication_mixed.test b/mysql-test/suite/sql_sequence/replication_mixed.test new file mode 100644 index 00000000..4796c848 --- /dev/null +++ b/mysql-test/suite/sql_sequence/replication_mixed.test @@ -0,0 +1,29 @@ +--source include/have_innodb.inc +--source include/have_binlog_format_mixed.inc +--source include/master-slave.inc + +--echo # +--echo # MDEV-16234 +--echo # CREATE TABLE .. SELECT LASTVAL is written to binlog as single +--echo # statement, causes discrepancy between master and slave +--echo # + +CREATE SEQUENCE s1 ENGINE=InnoDB; +--disable_ps2_protocol +SELECT NEXTVAL(s1); +--enable_ps2_protocol +CREATE TABLE t1 ENGINE=InnoDB SELECT LASTVAL(s1) AS a; +INSERT INTO t1 VALUES (NEXTVAL(s1)); +INSERT INTO t1 VALUES (LASTVAL(s1)); +SELECT * FROM t1; +SELECT * from s1; +--sync_slave_with_master +SELECT * FROM t1; +SELECT * from s1; + +# Cleanup +--connection master +DROP TABLE t1; +DROP SEQUENCE s1; + +--source include/rpl_end.inc |