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:
None 
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
Description:
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
    ->     ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
    ->     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".

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.