mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
103 lines
2.3 KiB
Text
103 lines
2.3 KiB
Text
#
|
|
# 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 $cluster_uuid = `SELECT LEFT(@@global.gtid_executed, 36)`
|
|
|
|
--connection node_1
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
|
|
--replace_result $local_uuid <local_uuid> $cluster_uuid <cluster_uuid>
|
|
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
|
|
|
|
--connection node_2
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
|
|
--replace_result $local_uuid <local_uuid> $cluster_uuid <cluster_uuid>
|
|
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
|