Bug #45102 mysql_upgrade fails with FATAL ERROR
Submitted: 26 May 2009 18:39 Modified: 2 Jul 2009 9:28
Reporter: norbert van Nobelen Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:6.0.10-alpha OS:Linux (OpenSuse 10.3)
Assigned to: CPU Architecture:Any
Tags: 5.1, 6.0, mysql_upgrade

[26 May 2009 18:39] norbert van Nobelen
Description:
While upgrading mysql, mysql_upgrade fails on the following tables:

Repairing tables
mysql.help_category
Error    : Incorrect information in file: './mysql/help_category.frm'
error    : Corrupt
mysql.help_keyword
Error    : Incorrect information in file: './mysql/help_keyword.frm'
error    : Corrupt
mysql.help_topic
Error    : Incorrect information in file: './mysql/help_topic.frm'
error    : Corrupt
mysql.proc
Error    : Incorrect information in file: './mysql/proc.frm'
error    : Corrupt
mysql.time_zone_name
Error    : Incorrect information in file: './mysql/time_zone_name.frm'
error    : Corrupt
Running 'mysql_fix_privilege_tables'...
ERROR 1033 (HY000) at line 315: Incorrect information in file: './mysql/help_category.frm'
ERROR 1033 (HY000) at line 316: Incorrect information in file: './mysql/help_keyword.frm'
ERROR 1033 (HY000) at line 321: Incorrect information in file: './mysql/time_zone_name.frm'
ERROR 1033 (HY000) at line 326: Incorrect information in file: './mysql/help_topic.frm'
ERROR 1033 (HY000) at line 474: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 521: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 523: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 530: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 533: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 536: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 539: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 542: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 545: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 548: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000) at line 550: Incorrect information in file: './mysql/proc.frm'
FATAL ERROR: Upgrade failed

Consequence of failure seems to be that the following fails:
mysql> SELECT ADDDATE(CUR_DATE(),INTERVAL 1 DAY);
090526 20:40:11 [ERROR] mysqld: Incorrect information in file: './mysql/proc.frm'
ERROR 1033 (HY000): Incorrect information in file: './mysql/proc.frm'

How to repeat:
Previous version was a 5.1.31 version.
Upgrade scenario:
5.1.31 -> 6.0.10 -> problem with mysql -> downgrade to 5.4.0 -> Other problems -> message from mysql solving the 6.0.10 problem -> back to 6.0.10 -> ran the mysql_upgrade program.

Re-running the program, repeats the error. If required I can upload the proc.frm file.

Suggested fix:
Replace the mysql/*frm tables where possible instead of upgrading them. This should precent this failure.
[26 May 2009 19:19] norbert van Nobelen
Created work around:
Removed the offending tables, ran mysql_upgrade. This recreates the tables.
[26 May 2009 19:23] norbert van Nobelen
This line:
SELECT ADDDATE(CUR_DATE(),INTERVAL 1 DAY);
Should ofcourse be:
SELECT ADDDATE(CURDATE(),INTERVAL 1 DAY);
[2 Jun 2009 9:28] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior, although I can not run version 5.4 after downgrade either.

Please indicate if you run mysql_upgrade when you upgrade/downgrade each time.
[2 Jul 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".