Bug #20950 Win version of mysql_upgrade looks for mysqlcheck instead of mysqlcheck.exe
Submitted: 10 Jul 2006 19:44 Modified: 21 Sep 2006 1:38
Reporter: Markus Popp Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.0 OS:Microsoft Windows (Windows)
Assigned to: Alexey Botchkov

[10 Jul 2006 19:44] Markus Popp
Description:
mysql_upgrade cannot find D:\mysql\bin\mysqlcheck - even though mysqlcheck.exe perfectly exists on the specified location. Most likely reason seems to be that the extension is not specified.

How to repeat:
D:\mysql\bin>mysql_upgrade -u root -p --basedir=D:\mysql
Enter password: 
Can't find program 'D:\mysql\bin\mysqlcheck'
Please restart with --basedir=mysql-install-directory

D:\mysql\bin>dir

 Verzeichnis von D:\mysql\bin

10.07.2006  20:57    <DIR>          .
10.07.2006  20:57    <DIR>          ..
05.07.2006  17:56         1.196.032 comp-err.exe
05.07.2006  17:56         1.519.616 libmySQL.dll
05.07.2006  17:56         1.433.600 myisamchk.exe
05.07.2006  17:56         1.339.392 myisamlog.exe
05.07.2006  17:56         1.351.680 myisampack.exe
05.07.2006  17:56         1.314.816 myisam_ftdump.exe
05.07.2006  17:56         1.622.016 mysql.exe
05.07.2006  17:56         1.482.752 mysqladmin.exe
05.07.2006  17:56         1.499.136 mysqlbinlog.exe
05.07.2006  17:56         1.470.464 mysqlcheck.exe
05.07.2006  17:56         6.729.728 mysqld-debug.exe
05.07.2006  17:56         4.681.728 mysqld-max-nt.exe
05.07.2006  17:56         4.677.632 mysqld-max.exe
05.07.2006  17:56         4.182.016 mysqld-nt.exe
05.07.2006  17:56         4.177.920 mysqld.exe
05.07.2006  17:56         1.511.424 mysqldump.exe
05.07.2006  17:56         1.470.464 mysqlimport.exe
19.04.2006  04:41         1.561.600 MySQLInstanceConfig.exe
05.07.2006  17:56         1.519.616 mysqlmanager.exe
05.07.2006  17:56         1.474.560 mysqlshow.exe
05.07.2006  17:56         1.576.960 mysqltest.exe
05.07.2006  17:56         1.810.432 mysql_client_test.exe
05.07.2006  17:56         1.200.128 mysql_upgrade.exe
05.07.2006  17:56         1.191.936 my_print_defaults.exe
05.07.2006  17:56         1.171.456 perror.exe
05.07.2006  17:56         1.187.840 replace.exe
[10 Jul 2006 20:26] Peter Laursen
I have another variation here:

C:\Programmer\MySQL\MySQL Server 5.0\bin>mysql_upgrade -u root -p******* --base
dir=D:\mysqldb50
mysql_upgrade: unknown variable 'default-character-set=latin1'

I have the line "default-character-set=latin1" in both the [server] and the [client] section of my.ini

But thanks for pointing out to me where the EXECUTABLE was.  That clarifies something to me,  I actually allready posted this: http://bugs.mysql.com/bug.php?id=20921

Now wasn't it a reasonable idea NOT TO PACKAGE the *nix shell script with Windows versions?

My opinion:  the documentation on MySQL for Windows :-( :-( :-(
[10 Jul 2006 21:12] Miguel Solorzano
Thank you for the bug report. I changed the below line in the source file:

if (!test_file_exists_res
      (bindir, "mysqlcheck.exe", mysqlcheck_line, &mysqlcheck_end))
  {

from "mysqlcheck" to "mysqlcheck.exe" and:

C:\tmp>mysql_upgrade --basedir=c:/mysql
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.func                                         OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
Could not find MySQL command-line client (mysql).
Please use --basedir to specify the directory where MySQL is installed.

However there are another places for to fix also.
[21 Jul 2006 11:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/9412
[21 Jul 2006 11:46] Alexander Barkov
The patch is ok to push.
[16 Aug 2006 20:52] Reggie Burnett
Pushed to 5.0.25
[17 Aug 2006 10:42] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.0.25 changelog.
[19 Sep 2006 12:17] Morgan Tocker
Despite mysql_upgrade being available from 5.0.23 on "all operating systems", the scope of this bug is quite wide and the manual page should be adjusted.

My rationale is that the only operating system not previously supported was Windows, and this bug essentially stops the Windows version from working.

See: http://dev.mysql.com/doc/refman/5.0/en/mysql-upgrade.html

s/As of MySQL 5.0.23, mysql_upgrade is an executable binary and is available on all systems./As of MySQL 5.0.25, mysql_upgrade is available on all supported platforms./
[21 Sep 2006 1:38] Paul Dubois
I've changed the version from 5.0.23 to 5.0.25.
[21 Sep 2006 16:17] Miguel Solorzano
Bug: http://bugs.mysql.com/bug.php?id=22551 was marked as duplicate
of this one.