summaryrefslogtreecommitdiff
path: root/client/mysql_upgrade.c
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/deer.(none)>2006-07-21 17:02:04 +0500
committerunknown <holyfoot/hf@mysql.com/deer.(none)>2006-07-21 17:02:04 +0500
commitcbb65b525acc3847613a4e767a1991423c249bb4 (patch)
treed82d94a708c15b828dd550c04a2956aaaa6ca6ef /client/mysql_upgrade.c
parentc1306fc0f9a594ee56082b224de2ee8d5ecd1055 (diff)
downloadmariadb-git-cbb65b525acc3847613a4e767a1991423c249bb4.tar.gz
bug #20950 (mysql_upgrade looks for 'mysqlcheck' not for 'mysqlcheck.exe'
on Windows. Code added to look for different names on Windows client/mysql_upgrade.c: added conditionally-compiled part to look for different names of tools on Windows
Diffstat (limited to 'client/mysql_upgrade.c')
-rw-r--r--client/mysql_upgrade.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 3288b627554..ce7eb8dd61b 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -17,6 +17,14 @@
#include "client_priv.h"
#include <my_dir.h>
+#ifdef __WIN__
+const char *mysqlcheck_name= "mysqlcheck.exe";
+const char *mysql_name= "mysql.exe";
+#else
+const char *mysqlcheck_name= "mysqlcheck";
+const char *mysql_name= "mysql";
+#endif /*__WIN__*/
+
static my_bool opt_force= 0, opt_verbose= 0, tty_password= 0;
static char *user= (char*) "root", *basedir= 0, *datadir= 0, *opt_password= 0;
static my_bool upgrade_defaults_created= 0;
@@ -272,7 +280,7 @@ int main(int argc, char **argv)
strmake(bindir_end, "/bin", sizeof(bindir) - (int) (bindir_end - bindir)-1);
if (!test_file_exists_res
- (bindir, "mysqlcheck", mysqlcheck_line, &mysqlcheck_end))
+ (bindir, mysqlcheck_name, mysqlcheck_line, &mysqlcheck_end))
{
printf("Can't find program '%s'\n", mysqlcheck_line);
puts("Please restart with --basedir=mysql-install-directory");
@@ -342,7 +350,8 @@ int main(int argc, char **argv)
goto err_exit;
fix_priv_tables:
- if (!test_file_exists_res(bindir, "mysql", fix_priv_tables_cmd, &fix_cmd_end))
+ if (!test_file_exists_res(bindir, mysql_name,
+ fix_priv_tables_cmd, &fix_cmd_end))
{
puts("Could not find MySQL command-line client (mysql).");
puts