Bug #17632 Automatically trigger stored precedures based on events (user login, shutdown)
Submitted: 21 Feb 2006 23:08 Modified: 5 Mar 2006 9:16
Reporter: Morgan Tocker Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S4 (Feature request)
Version:5.1+ OS:Any (ALL)
Assigned to: CPU Architecture:Any

[21 Feb 2006 23:08] Morgan Tocker
Description:
I believe 5.1 is implementing a feature where it is possible define stored procedures to be called in multi-master replication's conflict resolution.

There are other opportunities where this automatically calling SPs could be quite beneficial.  One example noted was in a closed source application using MySQL.  It is difficult to change some settings (such as the character set),  but if a SP was called, it could work around this (credit: Arjen).

Another example is for shutdown and start up functions (although this could be emulated via specific scripts);

Use a 'settings' table that is heap engine based.  On successful shutdown, copy the data back to a MyISAM table.  On start up, load it back into the heap table.

How to repeat:
I'm sure there are a number of other events which could benefit from being able to define procedures to handle.
[5 Mar 2006 9:16] Valeriy Kravchuk
Thank you for a reasonable feature request. Yes, something similar to Oracle's triggers on system events (like user login and shutdown) will be really useful.
[5 Mar 2006 9:52] Valeriy Kravchuk
Bug #17633 is marked as a duplicate of this one. It was a request for just a "subset" of the features mentioned here.
[24 Aug 2010 9:34] Valeriy Kravchuk
Bug #30871 was marked as a duplicate of this one.
[24 Aug 2010 9:35] Valeriy Kravchuk
Bug #56176 was marked as a duplicate of this one.