Debian Codegraph @

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

raw
1 # ==== Purpose ====
2 #
3 # Verify that CREATE/DROP TEMPORARY TABLE is not written
4 # into binlog when @@session.binlog_format= ROW/MIXED.
5 #
6 # ==== Implementation ====
7 #
8 # 1. SET @@session.binlog_format= MIXED;
9 # 2. Verify that CREATE/DROP TEMPORARY TABLE is not written
10 # into binlog when @@session.binlog_format= MIXED.
11 # 3. SET @@session.binlog_format= ROW;
12 # 4. Verify that CREATE/DROP TEMPORARY TABLE is not written
13 # into binlog when @@session.binlog_format= ROW.
14 #
15 # ==== References ====
16 #
17 # Wl#8872 Allow CREATE TEMPORARY/DROP TEMPORARY in transaction when GTID_MODE=ON in RBR
18
19 # This test script will be run only in non GR set up.
20 --source include/not_group_replication_plugin.inc
21 --source include/have_log_bin.inc
22 # Test in this file is binlog format agnostic, thus no need
23 # to rerun it for every format.
24 --source include/have_binlog_format_row.inc
25 --source include/force_myisam_default.inc
26 --source include/have_myisam.inc
27
28 SET @@session.binlog_format= MIXED;
29 SELECT @@session.binlog_format;
30 CREATE TABLE t1(a INT) ENGINE=InnoDB;
31 CREATE TABLE t2(a INT) ENGINE=MyISAM;
32
33 --let $saved_master_pos=query_get_value('SHOW MASTER STATUS', Position, 1)
34 --source extra/binlog_tests/create_drop_temporary_table_myisam.test
35 --let $assert_text= CREATE/DROP TEMPORARY TABLE is not written into binlog when @@session.binlog_format= MIXED.
36 --let $assert_cond= [SHOW MASTER STATUS, Position, 1] = $saved_master_pos
37 --source include/assert.inc
38
39 SET @@session.binlog_format= ROW;
40 SELECT @@session.binlog_format;
41 --let $saved_master_pos=query_get_value('SHOW MASTER STATUS', Position, 1)
42 --source extra/binlog_tests/create_drop_temporary_table_myisam.test
43 --let $assert_text= CREATE/DROP TEMPORARY TABLE is not written into binlog when @@session.binlog_format= ROW.
44 --let $assert_cond= [SHOW MASTER STATUS, Position, 1] = $saved_master_pos
45 --source include/assert.inc
46
47 DROP TABLE t1,t2;