Bug #6629 Installation process does not update 'mysql' tables
Submitted: 15 Nov 2004 9:24 Modified: 23 Nov 2004 12:03
Reporter: Tom Metro Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:4.1.7 OS:Microsoft Windows (Windows NT)
Assigned to: Michael G. Zinner CPU Architecture:Any

[15 Nov 2004 9:24] Tom Metro
Description:
Neither the installer or the MySQL Server Instance Configuration Wizard on Windows makes any attempt to upgrade the 'mysql' tables.

How to repeat:
(Upgrade from 4.0.14b to 4.1.7.)
Uninstall 4.0.14b (leaving behind database files).
Install 4.1.7.
Run Configuration Wizard.
Manually edit my.ini datadir parameter to point to existing database files.
Run server.
Observe in the log:

	041113  3:36:15 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them

Suggested fix:
The installer or the Configuration Wizard should be responsible for updating the server's own administrative tables.

Currently neither the installer or the Configuration Wizard prompt the user for the datadir, which seems to be a necessary step in order to update those tables.

(See related bug #2146 about privilege tables not being automatically updated by the installer.)

Workaround:
Manually copy the time_zone* files and help_* files from {basedir}\data\mysql to {datadir}\mysql.
[18 Nov 2004 2:40] MySQL Verification Team
Thank you for the bug report.
[23 Nov 2004 12:03] Michael G. Zinner
Thanks for reporting. The problem with this issue is, that each main version of the server (e.g. 4.0 and 4.1 and 5.0 and 5.1) is treated as a seperate product by the installer.

Therefore one should never install a 4.1 server over a 4.0 or a 5.0 over a 4.1 installation.

It is not possible to cross-upgrade a product. The upgrade feature will only work for minor versions e.g. 4.1.5 to 4.1.7. If you want to change your server version you have to install the new version to a different directory und use the upcoming MySQL Migration Tool to handle the migration process.

The default installation directories are:

C:\Program Files\MySQL\MySQL Server 4.1
C:\Program Files\MySQL\MySQL Server 5.0
C:\Program Files\MySQL\MySQL Server 5.1

Migrating the server from one main version to another can require more than just copying several table files over - therefore this process will be handled by the Migration Tool.

You can get detailed information about the new server installation from the manual or the dev.mysql.com site.
[23 Nov 2004 22:08] Tom Metro
Michael G. Zinner writes:
> It is not possible to cross-upgrade a product. The upgrade feature 
> will only work for minor versions e.g. 4.1.5 to 4.1.7. If you want 
> to change your server version you have to install the new version to 
> a different directory and use the upcoming MySQL Migration Tool to 
> handle the migration process.

So more accurately, it's not that this bug won't be fixed, but that it'll be addressed in the "MySQL Migration Tool" rather than the installer.

As the "MySQL Migration Tool" doesn't yet exist, is there a HOWTO that explains what needs to be done? I don't recall the manual addressing the steps I ended up carrying out (running the SQL to update the privilege tables and copying over missing administrative table).

> The upgrade feature will only work for minor versions...

This upgrade feature is presumably built-in to the installer, right?

Interestingly the installer doesn't prompt the user for the current datadir. Does it obtain it automatically? Or will the upgrade feature not work if the administrator has set up their MySQL to use a non-default datadir?

> ...one should never install a 4.1 server over a 4.0 or a 5.0
> over a 4.1 installation.

This bares some added emphasis in the manual. I'd read essentially this same information in the manual, and then your response to this bug, but only upon a second read did I catch the point that it isn't 4.x vs. 5.x that are the major steps, but 4.0.x to 4.1.x that are considered major steps.

Now I understand why the default installation directories include two version number components. (I've seen too many installers for Windows products include extraneous version numbers in their default directories that I assumed this was just another case of that.)

 -Tom