[Commits] 3a88adc: MDEV-717 LP:1003679 - Wrong binlog order on concurrent DROP schema and

Alexey Botchkov holyfoot at askmonty.org
Thu May 5 10:30:30 EEST 2016


revision-id: 3a88adc3b2a046292301d708d4026bc6c5a4801e (mariadb-10.1.13-31-g3a88adc)
parent(s): 46973bb3ad57281ae02f6d61bd7e47b6d26b8acd
committer: Alexey Botchkov
timestamp: 2016-05-05 11:28:35 +0400
message:

MDEV-717 LP:1003679 - Wrong binlog order on concurrent DROP schema and
         CREATE function.

         Test case added.

---
 mysql-test/suite/binlog/r/binlog_mdev717.result | 40 ++++++++++++++++++++++
 mysql-test/suite/binlog/t/binlog_mdev717.test   | 45 +++++++++++++++++++++++++
 2 files changed, 85 insertions(+)

diff --git a/mysql-test/suite/binlog/r/binlog_mdev717.result b/mysql-test/suite/binlog/r/binlog_mdev717.result
new file mode 100644
index 0000000..82f8e5a
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_mdev717.result
@@ -0,0 +1,40 @@
+RESET MASTER;
+CREATE DATABASE mysqltest;
+SET DEBUG_SYNC= "after_wait_locked_schema_name SIGNAL locked WAIT_FOR release";
+DROP DATABASE mysqltest;;
+SET DEBUG_SYNC= "now WAIT_FOR locked";
+SET DEBUG_SYNC= "before_wait_locked_pname SIGNAL release";
+CREATE FUNCTION mysqltest.f1() RETURNS INT RETURN 1;
+ERROR 42000: Unknown database 'mysqltest'
+CREATE DATABASE mysqltest;
+SET DEBUG_SYNC= "after_wait_locked_schema_name SIGNAL locked WAIT_FOR release";
+DROP DATABASE mysqltest;;
+SET DEBUG_SYNC= "now WAIT_FOR locked";
+SET DEBUG_SYNC= "before_wait_locked_pname SIGNAL release";
+CREATE EVENT mysqltest.e1 ON SCHEDULE EVERY 15 MINUTE DO BEGIN END;
+ERROR 42000: Unknown database 'mysqltest'
+CREATE DATABASE mysqltest;
+CREATE EVENT mysqltest.e1 ON SCHEDULE EVERY 15 MINUTE DO BEGIN END;
+SET DEBUG_SYNC= "after_wait_locked_schema_name SIGNAL locked WAIT_FOR release";
+DROP DATABASE mysqltest;;
+SET DEBUG_SYNC= "now WAIT_FOR locked";
+SET DEBUG_SYNC= "before_wait_locked_pname SIGNAL release";
+ALTER EVENT mysqltest.e1 ON SCHEDULE EVERY 20 MINUTE DO BEGIN END;
+ERROR 42000: Unknown database 'mysqltest'
+SET DEBUG_SYNC= "RESET";
+include/show_binlog_events.inc
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Gtid	#	#	GTID #-#-#
+master-bin.000001	#	Query	#	#	CREATE DATABASE mysqltest
+master-bin.000001	#	Gtid	#	#	GTID #-#-#
+master-bin.000001	#	Query	#	#	DROP DATABASE mysqltest
+master-bin.000001	#	Gtid	#	#	GTID #-#-#
+master-bin.000001	#	Query	#	#	CREATE DATABASE mysqltest
+master-bin.000001	#	Gtid	#	#	GTID #-#-#
+master-bin.000001	#	Query	#	#	DROP DATABASE mysqltest
+master-bin.000001	#	Gtid	#	#	GTID #-#-#
+master-bin.000001	#	Query	#	#	CREATE DATABASE mysqltest
+master-bin.000001	#	Gtid	#	#	GTID #-#-#
+master-bin.000001	#	Query	#	#	use `test`; CREATE DEFINER=`root`@`localhost` EVENT mysqltest.e1 ON SCHEDULE EVERY 15 MINUTE DO BEGIN END
+master-bin.000001	#	Gtid	#	#	GTID #-#-#
+master-bin.000001	#	Query	#	#	DROP DATABASE mysqltest
diff --git a/mysql-test/suite/binlog/t/binlog_mdev717.test b/mysql-test/suite/binlog/t/binlog_mdev717.test
new file mode 100644
index 0000000..f321af2
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_mdev717.test
@@ -0,0 +1,45 @@
+# MDEV-717 LP:1003679 - Wrong binlog order on concurrent DROP schema and CREATE function.
+
+--source include/have_log_bin.inc
+RESET MASTER;
+
+connect(con1,localhost,root);
+connection default;
+
+CREATE DATABASE mysqltest;
+SET DEBUG_SYNC= "after_wait_locked_schema_name SIGNAL locked WAIT_FOR release";
+--send DROP DATABASE mysqltest;
+connection con1;
+SET DEBUG_SYNC= "now WAIT_FOR locked";
+SET DEBUG_SYNC= "before_wait_locked_pname SIGNAL release";
+--error ER_BAD_DB_ERROR
+CREATE FUNCTION mysqltest.f1() RETURNS INT RETURN 1;
+connection default;
+--reap
+
+CREATE DATABASE mysqltest;
+SET DEBUG_SYNC= "after_wait_locked_schema_name SIGNAL locked WAIT_FOR release";
+--send DROP DATABASE mysqltest;
+connection con1;
+SET DEBUG_SYNC= "now WAIT_FOR locked";
+SET DEBUG_SYNC= "before_wait_locked_pname SIGNAL release";
+--error ER_BAD_DB_ERROR
+CREATE EVENT mysqltest.e1 ON SCHEDULE EVERY 15 MINUTE DO BEGIN END;
+connection default;
+--reap
+
+CREATE DATABASE mysqltest;
+CREATE EVENT mysqltest.e1 ON SCHEDULE EVERY 15 MINUTE DO BEGIN END;
+SET DEBUG_SYNC= "after_wait_locked_schema_name SIGNAL locked WAIT_FOR release";
+--send DROP DATABASE mysqltest;
+connection con1;
+SET DEBUG_SYNC= "now WAIT_FOR locked";
+SET DEBUG_SYNC= "before_wait_locked_pname SIGNAL release";
+--error ER_BAD_DB_ERROR
+ALTER EVENT mysqltest.e1 ON SCHEDULE EVERY 20 MINUTE DO BEGIN END;
+connection default;
+--reap
+
+SET DEBUG_SYNC= "RESET";
+--source include/show_binlog_events.inc
+


More information about the commits mailing list