summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/rpl_drop_temp.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/suite/rpl/t/rpl_drop_temp.test
parentInitial commit. (diff)
downloadmariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz
mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_drop_temp.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_drop_temp.test94
1 files changed, 94 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test
new file mode 100644
index 00000000..7158e2a8
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test
@@ -0,0 +1,94 @@
+##############################################
+# Change Author: JBM
+# Change Date: 2006-02-07
+# Change: Added ENGINE=MyISAM
+##############################################
+source include/have_binlog_format_mixed_or_statement.inc;
+source include/master-slave.inc;
+
+--disable_warnings
+create database if not exists mysqltest;
+--enable_warnings
+
+connect (con_temp,127.0.0.1,root,,test,$MASTER_MYPORT,);
+
+connection con_temp;
+use mysqltest;
+create temporary table mysqltest.t1 (n int)ENGINE=MyISAM;
+create temporary table mysqltest.t2 (n int)ENGINE=MyISAM;
+
+disconnect con_temp;
+--source include/wait_until_disconnected.inc
+
+connection master;
+-- let $wait_binlog_event= DROP
+-- source include/wait_for_binlog_event.inc
+sync_slave_with_master;
+
+connection slave;
+show status like 'Slave_open_temp_tables';
+# Cleanup
+connection master;
+drop database mysqltest;
+sync_slave_with_master;
+
+#
+# Bug#49137
+# This test verifies if DROP MULTI TEMPORARY TABLE
+# will cause different errors on master and slave,
+# when one or more of these tables do not exist.
+#
+
+connection master;
+DROP TEMPORARY TABLE IF EXISTS tmp1;
+CREATE TEMPORARY TABLE t1 ( a int );
+--error 1051
+DROP TEMPORARY TABLE t1, t2;
+--error 1051
+DROP TEMPORARY TABLE tmp2;
+sync_slave_with_master;
+
+connection slave;
+stop slave;
+wait_for_slave_to_stop;
+
+connection master;
+CREATE TEMPORARY TABLE tmp3 (a int);
+DROP TEMPORARY TABLE tmp3;
+
+connection slave;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+START SLAVE;
+
+connection master;
+sync_slave_with_master;
+
+
+#
+# BUG#54842: DROP TEMPORARY TABLE not binlogged after manual switching binlog format to ROW
+#
+
+--source include/rpl_reset.inc
+--connection master
+
+CREATE TABLE t1 ( i INT );
+--sync_slave_with_master
+SHOW STATUS LIKE 'Slave_open_temp_tables';
+
+--connect(con1,localhost,root,,)
+CREATE TEMPORARY TABLE ttmp1 ( i INT );
+SET SESSION binlog_format=ROW;
+--disconnect con1
+
+-- connection master
+--let $wait_binlog_event= DROP
+--source include/wait_for_binlog_event.inc
+--sync_slave_with_master
+SHOW STATUS LIKE 'Slave_open_temp_tables';
+
+--connection master
+--source include/show_binlog_events.inc
+DROP TABLE t1;
+
+# End of 4.1 tests
+--source include/rpl_end.inc