summaryrefslogtreecommitdiff
path: root/mysql-test/suite/binlog
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-07-26 22:42:35 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-07-26 22:42:35 +0200
commitd97342b6f2cfdd55eb0f82b390ebc89c5997c382 (patch)
tree238dbb11c51a2352c99de198586b84f260b3aad9 /mysql-test/suite/binlog
parent00a254cc069e77f2088f6fbf8c367f247cfdd0dc (diff)
parent32c6f40a6319d493e5270c72ac5d27dc99d1b242 (diff)
downloadmariadb-git-d97342b6f2cfdd55eb0f82b390ebc89c5997c382.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'mysql-test/suite/binlog')
-rw-r--r--mysql-test/suite/binlog/include/drop_temp_table.test70
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result41
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result41
3 files changed, 152 insertions, 0 deletions
diff --git a/mysql-test/suite/binlog/include/drop_temp_table.test b/mysql-test/suite/binlog/include/drop_temp_table.test
index 4241974d813..9139ac76017 100644
--- a/mysql-test/suite/binlog/include/drop_temp_table.test
+++ b/mysql-test/suite/binlog/include/drop_temp_table.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--disable_warnings
DROP DATABASE IF EXISTS `drop-temp+table-test`;
@@ -104,3 +105,72 @@ RESET MASTER;
DROP TABLE t1;
# End of 4.1 tests
+
+
+--echo #
+--echo # BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
+--echo # WITH TEMPORARY TABLE -> ERRORS
+
+--echo # Test case for DELETE query.
+
+RESET MASTER;
+connect (con1,localhost,root,,);
+
+--echo # Set up.
+--connection default
+--disable_warnings
+SET @save_binlog_format= @@session.binlog_format;
+SET @@session.binlog_format=STATEMENT;
+let $MYSQLD_DATADIR= `select @@datadir`;
+CREATE TABLE t1 (a INT) ENGINE=INNODB;
+
+--connection con1
+SET @@session.binlog_format=STATEMENT;
+CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
+
+--connection default
+DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
+
+--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug28642318.sql
+
+--connection default
+DROP TABLE t1;
+
+--echo # DELETE query fails with table re-open error without patch.
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug28642318.sql
+
+--echo # Clean up.
+--connection con1
+DROP TABLE IF EXISTS t1;
+
+--connection default
+DROP TABLE IF EXISTS t1;
+RESET MASTER;
+
+--echo # Test case for DROP query.
+
+--connection default
+CREATE TABLE t1 (a INT) ENGINE=INNODB;
+
+--connection con1
+CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
+
+--connection default
+DROP TABLE t1;
+
+--connection con1
+DROP TABLE t1;
+
+--connection default
+--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug28642318.sql
+
+--echo # DROP table query fails with unknown table error without patch.
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug28642318.sql
+
+--echo # Clean up
+--connection default
+SET @@session.binlog_format= @save_binlog_format;
+RESET MASTER;
+
+--disconnect con1
+--enable_warnings
diff --git a/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result
index 831a1c8a9a3..60596be480f 100644
--- a/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result
+++ b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result
@@ -61,3 +61,44 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
RESET MASTER;
DROP TABLE t1;
+#
+# BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
+# WITH TEMPORARY TABLE -> ERRORS
+# Test case for DELETE query.
+RESET MASTER;
+connect con1,localhost,root,,;
+# Set up.
+connection default;
+SET @save_binlog_format= @@session.binlog_format;
+SET @@session.binlog_format=STATEMENT;
+CREATE TABLE t1 (a INT) ENGINE=INNODB;
+connection con1;
+SET @@session.binlog_format=STATEMENT;
+CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
+connection default;
+DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
+connection default;
+DROP TABLE t1;
+# DELETE query fails with table re-open error without patch.
+# Clean up.
+connection con1;
+DROP TABLE IF EXISTS t1;
+connection default;
+DROP TABLE IF EXISTS t1;
+RESET MASTER;
+# Test case for DROP query.
+connection default;
+CREATE TABLE t1 (a INT) ENGINE=INNODB;
+connection con1;
+CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
+connection default;
+DROP TABLE t1;
+connection con1;
+DROP TABLE t1;
+connection default;
+# DROP table query fails with unknown table error without patch.
+# Clean up
+connection default;
+SET @@session.binlog_format= @save_binlog_format;
+RESET MASTER;
+disconnect con1;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
index 4bca7cbe298..ae7852be9e3 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
@@ -89,3 +89,44 @@ master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1`
RESET MASTER;
DROP TABLE t1;
+#
+# BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
+# WITH TEMPORARY TABLE -> ERRORS
+# Test case for DELETE query.
+RESET MASTER;
+connect con1,localhost,root,,;
+# Set up.
+connection default;
+SET @save_binlog_format= @@session.binlog_format;
+SET @@session.binlog_format=STATEMENT;
+CREATE TABLE t1 (a INT) ENGINE=INNODB;
+connection con1;
+SET @@session.binlog_format=STATEMENT;
+CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
+connection default;
+DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
+connection default;
+DROP TABLE t1;
+# DELETE query fails with table re-open error without patch.
+# Clean up.
+connection con1;
+DROP TABLE IF EXISTS t1;
+connection default;
+DROP TABLE IF EXISTS t1;
+RESET MASTER;
+# Test case for DROP query.
+connection default;
+CREATE TABLE t1 (a INT) ENGINE=INNODB;
+connection con1;
+CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
+connection default;
+DROP TABLE t1;
+connection con1;
+DROP TABLE t1;
+connection default;
+# DROP table query fails with unknown table error without patch.
+# Clean up
+connection default;
+SET @@session.binlog_format= @save_binlog_format;
+RESET MASTER;
+disconnect con1;