Can I create an event in a trigger?
Is it possible to create a new event from inside a trigger?
It's not something I'd particularly recomment, but I'm just wondering if it can be done.I would like to fire a insert in response to an update, but have the insert be done delayed.
Right now I insert a value into a temp table and have a predefined event sweep that table every x minutes开发者_开发百科.However this seems wasteful because most of the time there's nothing to do.
If I cannot create the event, can I at least enable/disable it on the fly?You cannot create an event from a stored procedure or trigger.
>If I cannot create the event, can I at least enable/disable it on the fly?
ALTER EVENT event1 ENABLE;
ALTER EVENT event1 DISABLE;
CREATE EVENT Syntax
精彩评论