Debian Codegraph @

mysql-test/suite/binlog/t/binlog_drop_temp_table_on_disconnect_stmt.test

raw
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/have_binlog_format_statement.inc
20
21 RESET MASTER;
22
23 CREATE TABLE t1(a INT) ENGINE=InnoDB;
24
25 --source include/count_sessions.inc
26
27 --connect(con1,localhost,root)
28
29 # A DROP should be logged for the following tables because CREATE TABLE
30 # is logged
31 CREATE TEMPORARY TABLE tmp1 ENGINE=InnoDB SELECT * FROM t1;
32 CREATE TEMPORARY TABLE tmp5 (a INT) ENGINE=InnoDB;
33 CREATE TEMPORARY TABLE tmp7 LIKE t1;
34
35 --disconnect con1
36 --connection default
37 --source include/wait_until_count_sessions.inc
38
39 --source include/show_binlog_events.inc
40
41 DROP TABLE t1;
42