Bug #34389 event sched. spawns new event while a previous instance of it is still runing
Submitted: 7 Feb 2008 18:12 Modified: 8 Feb 2008 19:24
Reporter: Robert Hamel Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S4 (Feature request)
Version:5.1.22-rc-log OS:Linux
Assigned to: CPU Architecture:Any
Triage: D5 (Feature request)

[7 Feb 2008 18:12] Robert Hamel
Description:
I have a few events that are scheduled to run every minute.  The scheduler will launch a new instance of the event even though there is one already running which simply duplicates cron.

I was expecting a "don't start a new one until the previous one is finished" behaviour

How to repeat:
create a proc with an that updates a row in a table and commits.  

Schedule it to run every minute

update that row on the command line and just wait

Suggested fix:
If that is the intended functionality then you might want to mention that in the documentation but I would either make the default behavior: "don't start a new one until the old one is finished" or at least give the ability to specify that behavior in the create event syntax.
[8 Feb 2008 7:53] Sveta Smirnova
Thank you for the feature request.

Although you can easily implement such functionality in the event itself.
[8 Feb 2008 19:24] Robert Hamel
Thanks for the update....and yes I added get_lock and release_lock to get around the problem...but I wasn't expecting that behavior