summaryrefslogtreecommitdiff
path: root/mysql-test/t/events_scheduling.test
diff options
context:
space:
mode:
authorandrey@lmy004. <>2006-05-22 20:46:13 +0200
committerandrey@lmy004. <>2006-05-22 20:46:13 +0200
commitb429d73d62791d05a6448135c78beb8966008888 (patch)
tree3d492384ce369edfba63a049dc688265d9d27a21 /mysql-test/t/events_scheduling.test
parent9fca0d766b3a35b9ac930546dc691b5ed9338b7f (diff)
downloadmariadb-git-b429d73d62791d05a6448135c78beb8966008888.tar.gz
fix for bug #17619 Scheduler race conditions
- Scheduler is either initialized at server start or never. Starting & stopping is now suspending & resuming. - The scheduler has clear OO interface - Now all calls to the scheduler are synchronous - GLOBAL event_scheduler uses thd::sys_var_tmp (see set_var.cc) - External API is encapsulated into class Events - Includes fixes for all comments of Kostja's review of 19.05.2005 Starting to merge into 5.1-release (5.1.10) and push
Diffstat (limited to 'mysql-test/t/events_scheduling.test')
-rw-r--r--mysql-test/t/events_scheduling.test6
1 files changed, 3 insertions, 3 deletions
diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test
index ae3cc7d5fac..a73d25cd8ee 100644
--- a/mysql-test/t/events_scheduling.test
+++ b/mysql-test/t/events_scheduling.test
@@ -15,7 +15,7 @@ CREATE EVENT start_n_end
DO INSERT INTO table_2 VALUES(1);
--sleep 5
CREATE EVENT only_one_time ON SCHEDULE EVERY 2 SECOND ENDS NOW() + INTERVAL 1 SECOND DO INSERT INTO table_3 VALUES(1);
-CREATE EVENT two_time ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND DO INSERT INTO table_4 VALUES(1);
+CREATE EVENT two_time ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND ON COMPLETION PRESERVE DO INSERT INTO table_4 VALUES(1);
--sleep 5
SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1;
SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2;
@@ -28,8 +28,8 @@ DROP EVENT start_n_end;
--echo "Already dropped because ended. Therefore an error."
--error ER_EVENT_DOES_NOT_EXIST
DROP EVENT only_one_time;
---echo "Already dropped because ended. Therefore an error."
---error ER_EVENT_DOES_NOT_EXIST
+--echo "Should be preserved"
+SELECT EVENT_NAME, STATUS FROM INFORMATION_SCHEMA.EVENTS;
DROP EVENT two_time;
DROP TABLE table_1;
DROP TABLE table_2;