diff options
author | Elena Stepanova <elenst@montyprogram.com> | 2017-08-05 20:41:55 +0300 |
---|---|---|
committer | Elena Stepanova <elenst@montyprogram.com> | 2017-08-05 20:41:55 +0300 |
commit | 008786aedb7cacf41a371937c6215c41638c1f96 (patch) | |
tree | 6115ea76ee0a3be7b17dcf491db081434f9e2f88 | |
parent | 8b019f87dd51b1d2755655d2f136d5429fc47e1f (diff) | |
download | mariadb-git-008786aedb7cacf41a371937c6215c41638c1f96.tar.gz |
MDEV-13456 main.create_drop_event fails sporadically in buildbot
Avoid race conditions between the test flow and events by waiting
for all started events to finish execution after switching off
event scheduler
-rw-r--r-- | mysql-test/t/create_drop_event.test | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/t/create_drop_event.test b/mysql-test/t/create_drop_event.test index e136798ac29..d885a39e453 100644 --- a/mysql-test/t/create_drop_event.test +++ b/mysql-test/t/create_drop_event.test @@ -10,11 +10,13 @@ CREATE OR REPLACE EVENT IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO DROP DAT CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (10); SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; +--source include/count_sessions.inc SET GLOBAL event_scheduler=on; let $wait_condition= SELECT count(*)>0 FROM t1; --source include/wait_condition.inc SELECT DISTINCT a FROM t1; SET GLOBAL event_scheduler=off; +--source include/wait_until_count_sessions.inc DELETE FROM t1; --error ER_EVENT_ALREADY_EXISTS @@ -30,6 +32,7 @@ let $wait_condition= SELECT count(*)>0 FROM t1; --source include/wait_condition.inc SELECT DISTINCT a FROM t1; SET GLOBAL event_scheduler=off; +--source include/wait_until_count_sessions.inc DELETE FROM t1; DROP EVENT IF EXISTS ev1; |