summaryrefslogtreecommitdiff
path: root/mysql-test/t/events_scheduling.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/events_scheduling.test')
-rw-r--r--mysql-test/t/events_scheduling.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test
index 041a2def490..5f16f8bea6a 100644
--- a/mysql-test/t/events_scheduling.test
+++ b/mysql-test/t/events_scheduling.test
@@ -108,6 +108,32 @@ DROP TABLE table_1;
DROP TABLE table_2;
DROP TABLE table_3;
DROP TABLE table_4;
+
+-- echo
+-- echo Bug #50087 Interval arithmetic for Event_queue_element is not portable.
+-- echo
+
+CREATE TABLE t1(a int);
+
+CREATE EVENT e1 ON SCHEDULE EVERY 1 MONTH
+STARTS NOW() - INTERVAL 1 MONTH
+ENDS NOW() + INTERVAL 2 MONTH
+ON COMPLETION PRESERVE
+DO
+ INSERT INTO t1 VALUES (1);
+
+CREATE EVENT e2 ON SCHEDULE EVERY 1 MONTH
+STARTS NOW()
+ENDS NOW() + INTERVAL 11 MONTH
+ON COMPLETION PRESERVE
+DO
+ INSERT INTO t1 VALUES (1);
+
+DROP TABLE t1;
+DROP EVENT e1;
+DROP EVENT e2;
+
+
DROP DATABASE events_test;
SET GLOBAL event_scheduler=@event_scheduler;