mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
6d8f6b5bfd
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.
12 lines
942 B
Text
12 lines
942 B
Text
create database if not exists mysqltest_events_test;
|
|
use mysqltest_events_test;
|
|
set global event_scheduler=off;
|
|
create table execution_log(name char(10));
|
|
create event abc1 on schedule every 1 second do insert into execution_log value('abc1');
|
|
create event abc2 on schedule every 1 second do insert into execution_log value('abc2');
|
|
create event abc3 on schedule every 1 second do insert into execution_log value('abc3');
|
|
select name from execution_log;
|
|
name
|
|
insert into mysql.event values ('db1','bad','select 42','root@localhost',NULL,1000,'MICROSECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment1','SYSTEM');
|
|
insert into mysql.event values ('db1','bad2','sect','root@localhost',NULL,1000,'SECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment2','SYSTEM');
|
|
"Now we restart the server"
|