From 0e12486f635b5b112ab5d9eb586f94ec9d93f180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Sun, 4 Sep 2016 17:44:20 +0200 Subject: [PATCH 2/2] Add test case for Bug #82848 --- mysql-test/r/bug82848.result | 12 ++++++++++++ mysql-test/t/bug82848.test | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 mysql-test/r/bug82848.result create mode 100644 mysql-test/t/bug82848.test diff --git a/mysql-test/r/bug82848.result b/mysql-test/r/bug82848.result new file mode 100644 index 0000000..c181da8 --- /dev/null +++ b/mysql-test/r/bug82848.result @@ -0,0 +1,12 @@ +RESET MASTER; +USE test; +CREATE TABLE t1 (id SERIAL); +FLUSH LOGS; +PURGE BINARY LOGS BEFORE NOW(); +Warnings: +Warning 1868 file ./master-bin.000002 was not purged because it is the active log file. +INSERT INTO t1 VALUES(NULL),(NULL),(NULL); +RESET MASTER; +# restart +1 +DROP TABLE t1; diff --git a/mysql-test/t/bug82848.test b/mysql-test/t/bug82848.test new file mode 100644 index 0000000..b545884 --- /dev/null +++ b/mysql-test/t/bug82848.test @@ -0,0 +1,22 @@ +--source include/have_gtid.inc +--source include/force_restart.inc + +RESET MASTER; +USE test; +CREATE TABLE t1 (id SERIAL); +FLUSH LOGS; +PURGE BINARY LOGS BEFORE NOW(); +INSERT INTO t1 VALUES(NULL),(NULL),(NULL); +--exec $MYSQL_DUMP --all-databases --triggers --routines --events --master-data=2 > $MYSQLTEST_VARDIR/tmp/bug82848.sql 2> /dev/null + +RESET MASTER; +--exec $MYSQL --force < $MYSQLTEST_VARDIR/tmp/bug82848.sql +--let $gtid_executed_before= `SELECT @@GLOBAL.GTID_EXECUTED` + +--source include/restart_mysqld.inc +--let $gtid_executed_after= `SELECT @@GLOBAL.GTID_EXECUTED` + +--let $gtid_diff= `SELECT '$gtid_executed_before' = '$gtid_executed_after'` +--echo $gtid_diff + +DROP TABLE t1; -- 2.7.4