| 1 |
# ====== Purpose ======= |
| 2 |
# |
| 3 |
# This test verifies that DROP for a temporary table created |
| 4 |
# in Statement mode is logged in binlog at session disconnect. |
| 5 |
# |
| 6 |
# ====== Implementation ====== |
| 7 |
# |
| 8 |
# Create temporary tables in statement mode using different engines, |
| 9 |
# now when you connect to the session after a disconnect print the |
| 10 |
# output of show binlog events. |
| 11 |
# This will verify that the DROP for temporary table created in stmt |
| 12 |
# mode is written to binary log at session disconnect. |
| 13 |
# |
| 14 |
# ====== References ======= |
| 15 |
# |
| 16 |
# Bug#24670909:USING TEMPORARY TABLES ON SLAVES INCREASES GTID SEQUENCE NUMBER |
| 17 |
# |
| 18 |
--source include/have_log_bin.inc |
| 19 |
--source include/force_myisam_default.inc |
| 20 |
--source include/have_myisam.inc |
| 21 |
--source include/have_binlog_format_statement.inc |
| 22 |
|
| 23 |
RESET MASTER; |
| 24 |
|
| 25 |
CREATE TABLE t1(a INT) ENGINE=InnoDB; |
| 26 |
CREATE TABLE t2(a INT) ENGINE=MyISAM; |
| 27 |
|
| 28 |
--source include/count_sessions.inc |
| 29 |
|
| 30 |
--connect(con1,localhost,root) |
| 31 |
|
| 32 |
# A DROP should be logged for the following tables because CREATE TABLE |
| 33 |
# is logged |
| 34 |
CREATE TEMPORARY TABLE tmp2 ENGINE=MyISAM SELECT * FROM t2; |
| 35 |
CREATE TEMPORARY TABLE tmp3 ENGINE=MyISAM SELECT * FROM t1; |
| 36 |
CREATE TEMPORARY TABLE tmp4 ENGINE=InnoDB SELECT * FROM t2; |
| 37 |
CREATE TEMPORARY TABLE tmp6 (a INT) ENGINE=MyISAM; |
| 38 |
CREATE TEMPORARY TABLE tmp8 LIKE t2; |
| 39 |
|
| 40 |
--disconnect con1 |
| 41 |
--connection default |
| 42 |
--source include/wait_until_count_sessions.inc |
| 43 |
|
| 44 |
--source include/show_binlog_events.inc |
| 45 |
|
| 46 |
DROP TABLE t1, t2; |
| 47 |
|