On 4/25/11 12:22 PM, Alexander Nozdrin wrote:
> #Atfile:///home/alik/MySQL/bzr/00/bug_events/mysql-5.1/ based
> 3670 Alexander Nozdrin 2011-04-25
> Patch for Bug#12394306: the sever may crash if mysql.event is corrupted.
> The problem was that wrong structure of mysql.event was not detected and
> the server continued to use wrongly-structured data.
> The fix is to check if the created/modified columns have
> the MYSQL_TYPE_TIMESTAMP type before using them.
Please take a look at the class Event_db_intact.
It seems this could be solved by something along the lines of:
if (open_system_tables_for_read(thd, &event_table, &...))
+ if (table_intact.check(event_table.table, &event_table_def))
+ close_system_tables(thd, &open_tables_backup);
+ my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0));
In the places where the event table is opened but not checked.