Bug #26512 Upgrade from 4.0 -> 5.0 fails
Submitted: 20 Feb 2007 23:07 Modified: 21 Feb 2007 9:08
Reporter: Steven Hartland Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.0.27 OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any

[20 Feb 2007 23:07] Steven Hartland
Description:
When upgrading from 4.0 -> 5.0.27 the upgrade fails in several places.
First when using mysql_upgrade.exe it fails to pass -f or --force when running mysql_fix_privilege_tables.sql so it fails on the first error.
ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv'

When running mysql_fix_privilege_tables.sql by hand and specifying --force it still fails due to error 1101 in several places:

ERROR 1101 (42000) at line 414: BLOB/TEXT column 'param_list' can't have a default value
ERROR 1101 (42000) at line 472: BLOB/TEXT column 'body' can't have a default value

Also Im not sure but it appears that this fails to detect tables which need upgrading as the same process on FreeBSD highlighted a large number of our tables which needed processing where as on windows with the same table set it did not.

How to repeat:
Try to run an upgrade from 4.0 -> 5.0.27 on Windows

Suggested fix:
Ensure that mysql_uprgade passes --force by default when running mysql_fix_privilege_tables.sql
Remove the DEFAULT statements in mysql_fix_privilege_tables.sql on for column param_list on line 414 and for column body on line 472.
[21 Feb 2007 7:43] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

First part is duplicate of the Bug #24740 and second of the Bug #23669
[21 Feb 2007 9:08] Steven Hartland
Appologies but seaching for mysql_upgrade on windows returned 0 results hence the submissing.