Bug #81980 load_events_from_db called at startup, not thread init
Submitted: 23 Jun 2016 0:45 Modified: 28 Jun 2016 15:27
Reporter: Trey Raymond Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S4 (Feature request)
Version:5.6, 5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: event scheduler

[23 Jun 2016 0:45] Trey Raymond
Description:
The function to sync up the in-memory event repository from the state of the db on disk:
https://github.com/mysql/mysql-server/blob/5.7/sql/events.cc#L1129
Useful bit of code, but to call it, you need to restart the server.  The only reference to it is in the event init function:
https://github.com/mysql/mysql-server/blob/5.7/sql/events.cc#L923
Pretty simple job to require downtime.

How to repeat:
n/a

Suggested fix:
on event scheduler thread start (i.e. set global event_scheduler=1), have load_events_from_db called.  can use existing mutex to protect it (don't want to risk a conflict with a create/alter/drop).
[28 Jun 2016 15:27] MySQL Verification Team
This is fully justified feature request.

Verified.