1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-27 05:41:41 +03:00
Files
mariadb/mysql-test/suite/galera/t/MW-360.test
Brave Galera Crew 36a2a185fe Galera4
2019-01-23 15:30:00 +04:00

101 lines
2.2 KiB
Plaintext

#
# MW-360 DROP TABLE containing temporary tables results in binlog divergence
#
--source include/galera_cluster.inc
--source include/have_binlog_format_row.inc
--connection node_1
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
--connection node_2
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
--connection node_1
#
# Straightforward temporary table
#
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
--let $local_uuid = `SELECT LEFT(@@global.gtid_executed, 36)`
#
# A mix of normal and temporary tables
#
# Temp table first, normal table second
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
DROP TABLE t1, t2;
# Normal table first, temporary table second
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
DROP TABLE t1, t2;
# Temporary table first, normal table second, temp table third
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
CREATE TEMPORARY TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t3 VALUES (3);
DROP TABLE t1, t2, t3;
# Normal table first, temporary table second, normal table third
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (2);
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t3 VALUES (3);
DROP TABLE t1, t2, t3;
#
# A temporary table masking a normal one
#
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (2);
DROP TABLE t1;
DROP TABLE t1;
--connection node_2
--let $gtid_executed_node2 = `SELECT @@global.gtid_executed;`
--connection node_1
--disable_query_log
# Node 1 has extra GTID set generated by the temporary table drop
--eval SELECT GTID_SUBSET('$gtid_executed_node2', @@global.gtid_executed) AS gtid_executed_equal;
--enable_query_log