mariadb/mysql-test/suite/sql_sequence/replication_mixed.test
Lena Startseva 9854fb6fa7 MDEV-31003: Second execution for ps-protocol
This patch adds for "--ps-protocol" second execution
of queries "SELECT".
Also in this patch it is added ability to disable/enable
(--disable_ps2_protocol/--enable_ps2_protocol) second
execution for "--ps-prototocol" in testcases.
2023-07-26 17:15:00 +07:00

29 lines
707 B
Text

--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