Spec-Zone .ru
спецификации, руководства, описания, API

19.4.5. Event Scheduler Status

The Event Scheduler writes information about event execution that terminates with an error or warning to the MySQL Server's error log. See Section 19.4.6, "The Event Scheduler and MySQL Privileges" for an example.

To obtain information about the state of the Event Scheduler for debugging and troubleshooting purposes, run mysqladmin debug (see Section 4.5.2, "mysqladmin — Client for Administering a MySQL Server"); after running this command, the server's error log contains output relating to the Event Scheduler, similar to what is shown here:

Events status:LLA = Last Locked At  LUA = Last Unlocked AtWOC = Waiting On Condition  DL = Data LockedEvent scheduler status:State      : INITIALIZEDThread id  : 0LLA        : init_scheduler:313LUA        : init_scheduler:318WOC        : NOWorkers    : 0Executed   : 0Data locked: NOEvent queue status:Element count   : 1Data locked     : NOAttempting lock : NOLLA             : init_queue:148LUA             : init_queue:168WOC             : NONext activation : 0000-00-00 00:00:00

In statements that occur as part of events executed by the Event Scheduler, diagnostics messages (not only errors, but also warnings) are written to the error log, and, on Windows, to the application event log. For frequently executed events, it is possible for this to result in many logged messages. For example, for SELECT ... INTO var_list statements, if the query returns no rows, a warning with error code 1329 occurs (No data), and the variable values remain unchanged. If the query returns multiple rows, error 1172 occurs (Result consisted of more than one row). For either condition, you can avoid having the warnings be logged by declaring a condition handler; see Section 13.6.7.2, "DECLARE ... HANDLER Syntax". For statements that may retrieve multiple rows, another strategy is to use LIMIT 1 to limit the result set to a single row.