| 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 |
|
| 26 |
SET @@session.binlog_format= MIXED; |
| 27 |
SELECT @@session.binlog_format; |
| 28 |
CREATE TABLE t1(a INT) ENGINE=InnoDB; |
| 29 |
|
| 30 |
--let $saved_master_pos=query_get_value('SHOW MASTER STATUS', Position, 1) |
| 31 |
--source extra/binlog_tests/create_drop_temporary_table.test |
| 32 |
--let $assert_text= CREATE/DROP TEMPORARY TABLE is not written into binlog when @@session.binlog_format= MIXED. |
| 33 |
--let $assert_cond= [SHOW MASTER STATUS, Position, 1] = $saved_master_pos |
| 34 |
--source include/assert.inc |
| 35 |
|
| 36 |
SET @@session.binlog_format= ROW; |
| 37 |
SELECT @@session.binlog_format; |
| 38 |
--let $saved_master_pos=query_get_value('SHOW MASTER STATUS', Position, 1) |
| 39 |
--source extra/binlog_tests/create_drop_temporary_table.test |
| 40 |
--let $assert_text= CREATE/DROP TEMPORARY TABLE is not written into binlog when @@session.binlog_format= ROW. |
| 41 |
--let $assert_cond= [SHOW MASTER STATUS, Position, 1] = $saved_master_pos |
| 42 |
--source include/assert.inc |
| 43 |
|
| 44 |
DROP TABLE t1; |