Bug #48749 clarify error message when event table cannot be opened
Submitted: 13 Nov 2009 5:55
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version:5.1.40 OS:Any
Assigned to: CPU Architecture:Any

[13 Nov 2009 5:55] Shane Bester
currently if you enable the event scheduler and the event table is readonly, the following message is printed:

091112 15:17:19 [ERROR] Event Scheduler: Failed to open table mysql.event
091112 15:17:19 [ERROR] Event Scheduler: Error while loading from disk.
091112 15:17:19 [Note] Event Scheduler: Purging the queue. 0 events
091112 15:17:19 [ERROR] Aborting

however, if you start event scheduler normally, then make the table read-only, flush tables and try create an event, we get a more informative error:

mysql> CREATE EVENT myevent
    ->     DO
    ->       UPDATE myschema.mytable SET mycol = mycol + 1;
ERROR 1036 (HY000): Table 'event' is read only

How to repeat:
make event.MYI, event.MYD, event.frm readonly.

mysqld --event-scheduler=1

try establish from error log why server didn't start..

Suggested fix:
this is a feature request to print a more precise error message instead of "Error while loading from disk".