Fix for bug#22738 Events: After stop and start disabled events could reside in the queue
Disabled events weren't removed from the memory queue after the scheduler has been re-enabled. After recalculation of next execution time of an event, it might get disabled. sql/event_queue.cc: Sort the event queue in a way that the disabled events will always be at the end. We will use this for cleaning it, starting from the end. After recalculating times in the queue, after the scheduler has been enabled after disabled state, the queue should be cleaned from DISABLED events. The queue is sorted in a way such that the disabled events are at the end. Thus, we can start from the end of the queue and remove all DISABLED till we find the first with different state. sql/events.cc: Add a comment about possible problem with replication of events, disabled events and server restarts.
Showing
Please register or sign in to comment