Today, I updated my development tree installation of MySQL 5.1
(which is already at 5.1.10-beta) and tested Event Scheduling
again. In MySQL 5.1.7 there were still a lot of rough edges, but
now a lot is much smoother.
Take for example this event:
DELIMITER //
DROP EVENT IF EXISTS copyGeneralLog //
CREATE EVENT copyGeneralLog
ON SCHEDULE EVERY 1 MINUTE
STARTS '2006-04-08 01:44:00'
ENDS '2006-04-08 01:50:00'
ON COMPLETION PRESERVE
ENABLE DO
BEGIN
INSERT INTO test.general_log
(event_time, user_host, thread_id, server_id,
command_type, argument)
SELECT event_time, user_host, thread_id, server_id,
command_type, argument
FROM general_log
WHERE command_type='Connect';
TRUNCATE TABLE general_log;
SELECT 1, 2, 3;
END //
DELIMITER ;
In 5.1.7, it was not guaranteed that …