summaryrefslogtreecommitdiff
path: root/mysql-test/extra/binlog_tests/drop_temp_table.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/extra/binlog_tests/drop_temp_table.test')
-rw-r--r--mysql-test/extra/binlog_tests/drop_temp_table.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/extra/binlog_tests/drop_temp_table.test b/mysql-test/extra/binlog_tests/drop_temp_table.test
index 63833c10c14..c852ee4c8a0 100644
--- a/mysql-test/extra/binlog_tests/drop_temp_table.test
+++ b/mysql-test/extra/binlog_tests/drop_temp_table.test
@@ -69,4 +69,34 @@ let $VERSION=`SELECT VERSION()`;
source include/show_binlog_events.inc;
DROP DATABASE `drop-temp+table-test`;
+
+#
+# Bug #54842: DROP TEMPORARY TABLE not binlogged after manual switching binlog format to ROW
+#
+# Sanity test. Checking that implicit DROP event is logged.
+#
+# After BUG#52616, the switch to ROW mode becomes effective even
+# if there are open temporary tables. As such the implicit drop
+# for temporary tables on session closing must be logged.
+#
+
+RESET MASTER;
+
+CREATE TABLE t1 ( i text );
+
+--connect(con1,localhost,root,,)
+CREATE TEMPORARY TABLE ttmp1 ( i text );
+SET @@session.binlog_format=ROW;
+INSERT INTO t1 VALUES ('1');
+SELECT @@session.binlog_format;
+--disconnect con1
+
+-- connection default
+--let $wait_binlog_event= DROP
+--source include/wait_for_binlog_event.inc
+-- source include/show_binlog_events.inc
+RESET MASTER;
+
+DROP TABLE t1;
+
# End of 4.1 tests