summaryrefslogtreecommitdiff
path: root/mysql-test/t/events_bugs.test
diff options
context:
space:
mode:
authorkroki/tomash@moonlight.home <>2007-03-16 17:31:07 +0300
committerkroki/tomash@moonlight.home <>2007-03-16 17:31:07 +0300
commit6d8f6b5bfd6351142164b1f85b613ea133d478d3 (patch)
tree8922072c4b428d1e321673d0ec9e460b316a9c07 /mysql-test/t/events_bugs.test
parent245668efb034aa55a5c34978f9e7a081dabb1ea2 (diff)
downloadmariadb-git-6d8f6b5bfd6351142164b1f85b613ea133d478d3.tar.gz
BUG#16420: Events: timestamps become UTC
BUG#26429: SHOW CREATE EVENT is incorrect for an event that STARTS NOW() BUG#26431: Impossible to re-create an event from backup if its STARTS clause is in the past WL#3698: Events: execution in local time zone The problem was that local times specified by the user in AT, STARTS and ENDS of CREATE EVENT/ALTER EVENT statement were converted to UTC, and the original time zone was forgotten. This way, event scheduler couldn't honor Daylight Saving Time shifts, and times shown to the user were also in UTC. Additionally, CREATE EVENT didn't allow times in the past, thus preventing straightforward event restoration from old backups. This patch reworks event scheduler time computations, performing them in the time zone associated with the event. Also it allows times to be in the past. The patch adds time_zone column to mysql.event table. NOTE: The patch is almost final, but the bug#9953 should be pushed first.
Diffstat (limited to 'mysql-test/t/events_bugs.test')
-rw-r--r--mysql-test/t/events_bugs.test11
1 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test
index 0790999d720..c1016f1752b 100644
--- a/mysql-test/t/events_bugs.test
+++ b/mysql-test/t/events_bugs.test
@@ -45,10 +45,17 @@ create event e_55 on schedule at 99990101000000 do drop table t;
create event e_55 on schedule every 10 hour starts 99990101000000 do drop table t;
--error ER_EVENT_ENDS_BEFORE_STARTS
create event e_55 on schedule every 10 minute ends 99990101000000 do drop table t;
---error ER_EVENT_EXEC_TIME_IN_THE_PAST
+--error ER_WRONG_VALUE
create event e_55 on schedule at 10000101000000 do drop table t;
---error ER_EVENT_EXEC_TIME_IN_THE_PAST
+
+# For the purpose of backup we allow times in the past. Here, no
+# error will be given, but the event won't be created. One may think
+# of that as if the event was created, then it turned out it's in the
+# past, so it was dropped because of implicit ON COMPLETION NOT
+# PRESERVE.
create event e_55 on schedule at 20000101000000 do drop table t;
+show events;
+
--error ER_PARSE_ERROR
create event e_55 on schedule at 20200101000000 starts 10000101000000 do drop table t;
--error ER_PARSE_ERROR