Bug #25405 mysql_upgrade fails due to case-sensitivity on dependant file- or path-names
Submitted: 4 Jan 2007 3:14 Modified: 8 May 2007 0:45
Reporter: Armin Schöffmann (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:mysql-5.0.34-nightly-20061220 OS:Windows (Windows)
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: Contribution

[4 Jan 2007 3:14] Armin Schöffmann
Description:
Mysql_upgrade will fail if :

one of the below files or subdirectories has been manually renamed with different case:

user.frm
mysql.exe
mysqlcheck.exe

%basedir%\bin
%basedir%\data\mysql
%basedir%\scripts

How to repeat:
Assume a mysql-installation in c:\program files\mysql 5.0.

Rename one of the above files or directories with different case:
e.g.
rename mysql-data-dir to c:\program files\mysql 5.0\data\MySQL

and call 
mysql_upgrade --basedir="c:\program files\mysql 5.0"

Can't find data directory. Please restart with --datadir=path-to-writable-data-d
ir

Suggested fix:
Change the c.sensitive strcmp functions in 

mysql_upgrade.c/ comp_names(struct fileinfo *a, struct fileinfo *b) 
and my_lib.c/    comp_names(struct fileinfo *a, struct fileinfo *b)

to their c.-insensitive counterparts (strcmpi).
[16 Jan 2007 21:44] Sveta Smirnova
Thank you for the report.

But for what do you want to rename these default files?
[17 Jan 2007 9:09] Armin Schöffmann
Sveta,
'cause there people out there using custom installers or integrate mysql within their product-setups (as we do) . (Remember, not long ago, MySQL didn't offer msi-based installers, concerning merge-modules, this is still the case).
Until now, there was no case-dependancy on windows installation-pathes and imho it should stay like this. 

Please refer to Iggy's comment at http://bugs.mysql.com/bug.php?id=22807, where this problem was originally reported.

Regards,
Armin.
[8 Mar 2007 14:30] Magnus Blåudd
New version of mysql_upgrade to be released  which will ask the mysqld where the datadir is. Then format a file name "<datadir>/mysql_upgrade_info". Tool does no longer rely on user.frm etc.
[26 Apr 2007 11:34] Bugs System
Pushed into 5.0.42
[26 Apr 2007 11:35] Bugs System
Pushed into 5.1.18-beta
[8 May 2007 0:45] Paul DuBois
Noted in 5.0.42, 5.1.18 changelogs.

On Windows, mysql_upgrade was sensitive to lettercase of the names of
some required components.