62 lines
1.9 KiB
Plaintext
62 lines
1.9 KiB
Plaintext
# ==== Purpose ====
|
|
#
|
|
# This test will execute an empty statement before setting GTID_NEXT session
|
|
# variable. It will use both ANONYMOUS and specific GTIDs, with both GTID_MODE
|
|
# equal to OFF and ON.
|
|
#
|
|
# As an empty statement should be considered an "innocent" statement from the
|
|
# GTID execution point of view (it doesn't change the database), it should be
|
|
# possible to execute a SET GTID_NEXT right after the empty statement without
|
|
# errors.
|
|
#
|
|
# ==== Related Bugs and Worklogs ====
|
|
#
|
|
# BUG#22811150 SQLCOM_EMPTY_QUERY should be considered GTID innocent
|
|
#
|
|
|
|
# Should be tested against "binlog disabled" server
|
|
--source include/not_log_bin.inc
|
|
|
|
USE test;
|
|
|
|
# With anonymous GTIDs
|
|
--source include/set_gtid_next.inc
|
|
CREATE TABLE t1 (c1 INT);
|
|
# This statement should be considered an empty statement
|
|
/*!99999 SET @@SESSION.non_supported_session_variable = 1*/;
|
|
--source include/set_gtid_next.inc
|
|
INSERT INTO t1 VALUES (1);
|
|
# This statement should be considered an empty statement
|
|
/*!99999 SET @@SESSION.non_supported_session_variable = 1*/;
|
|
--source include/set_gtid_next.inc
|
|
DROP TABLE t1;
|
|
|
|
# Sets GTID_MODE to ON for the second part of the test
|
|
--let $rpl_gtid_mode= ON
|
|
--let $rpl_set_enforce_gtid_consistency= 1
|
|
--let $rpl_server_numbers= 1
|
|
--let $rpl_skip_sync= 1
|
|
--source include/rpl_set_gtid_mode.inc
|
|
|
|
# Just in case that the server has some GTID_EXECUTED
|
|
SET GTID_NEXT='AUTOMATIC';
|
|
RESET MASTER;
|
|
|
|
# With non-anonymous GTIDs
|
|
--source include/set_gtid_next.inc
|
|
CREATE TABLE t2 (c1 INT);
|
|
# This statement should be considered an empty statement
|
|
/*!99999 SET @@SESSION.non_supported_session_variable = 1*/;
|
|
--source include/set_gtid_next.inc
|
|
INSERT INTO t2 VALUES (1);
|
|
# This statement should be considered an empty statement
|
|
/*!99999 SET @@SESSION.non_supported_session_variable = 1*/;
|
|
--source include/set_gtid_next.inc
|
|
DROP TABLE t2;
|
|
|
|
# Cleanup
|
|
SET GTID_NEXT='AUTOMATIC';
|
|
--let $rpl_gtid_mode= OFF
|
|
--let $rpl_set_enforce_gtid_consistency= 0
|
|
--source include/rpl_set_gtid_mode.inc
|