Bug #34805 Disabled events dropped during server start not correctly replicated
Submitted: 25 Feb 2008 13:07 Modified: 26 Feb 2008 12:22
Reporter: Andrey Hristov Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Stored Routines Severity:S2 (Serious)
Version:5.1+ OS:Any
Assigned to: CPU Architecture:Any

[25 Feb 2008 13:07] Andrey Hristov
 During server start-up the scheduler initialization checks mysql.event for disabled events with "on completion not preserve" clause and drops them. However, the SE interface is directly used and SBR is not bypassed. Thus, the drops won't be replicated to the slaves. The slaves will drop themselves when they are restarted but it might not happen at all. The worst possible scenario is :
M> restart, dropping event XYZ
S> running
M> create event XYZ....
S> replicating `create event XYZ` - error! 

How to repeat:
Use replication and the how-to repeat of bug#34804:


use test;
set global event_scheduler=1;
create event abc on schedule every 10 second ends now() + interval 25 second do select 1;
select sleep(3);
set global event_scheduler=0;
select sleep(30);
set global event_scheduler=1;
select * from mysql.event where name="abc";

$ mysqladmin shut
$ ./mysqld &

use test
create event abc on schedule every 10 second do select 1;
[26 Feb 2008 12:22] MySQL Verification Team
Thank you for the bug report.