]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- hardcode tool paths, we have them in various dirs
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 13 Jan 2008 00:50:22 +0000 (00:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql-upgrade.patch -> 1.6

mysql-upgrade.patch

index 5c0c01a6711db606f3c21235c98f7b256c9114ed..1d72d8e0a6d69c4cadad2af524b1894e572dbeed 100644 (file)
@@ -1,6 +1,13 @@
---- mysql-5.1.21-beta/client/mysql_upgrade.c~  2007-08-29 19:02:11.000000000 +0300
-+++ mysql-5.1.21-beta/client/mysql_upgrade.c   2007-08-29 22:38:46.000000000 +0300
-@@ -36,7 +36,7 @@
+--- mysql-5.1.22-rc/client/mysql_upgrade.c     2007-09-24 13:30:24.000000000 +0300
++++ mysql-5.1.22-rc-upgrade/client/mysql_upgrade.c     2008-01-12 17:28:56.945615880 +0200
+@@ -31,12 +31,12 @@
+ # endif
+ #endif
+-static char mysql_path[FN_REFLEN];
+-static char mysqlcheck_path[FN_REFLEN];
++static char *mysql_path = "/usr/bin/mysql";
++static char *mysqlcheck_path = "/usr/sbin/mysqlcheck";
  
  static my_bool opt_force, opt_verbose, debug_info_flag, debug_check_flag;
  static uint my_end_arg= 0;
  
  static DYNAMIC_STRING ds_args;
  
+@@ -349,91 +349,6 @@
+   DBUG_RETURN(ret);
+ }
+-
+-/*
+-  Look for the tool in the same directory as mysql_upgrade.
+-
+-  When running in a not yet installed build the the program
+-  will exist but it need to be invoked via it's libtool wrapper.
+-  Check if the found tool can executed and if not look in the
+-  directory one step higher up where the libtool wrapper normally
+-  is found
+-*/
+-
+-static void find_tool(char *tool_path, const char *tool_name)
+-{
+-  char path[FN_REFLEN];
+-  DYNAMIC_STRING ds_tmp;
+-  DBUG_ENTER("find_tool");
+-  DBUG_PRINT("enter", ("progname: %s", my_progname));
+-
+-  if (init_dynamic_string(&ds_tmp, "", 32, 32))
+-    die("Out of memory");
+-
+-  /* Initialize path with the full path to this program */
+-  if (get_full_path_to_executable(path))
+-  {
+-    /*
+-      Easy way to get full executable path failed, try
+-      other methods
+-    */
+-    if (my_progname[0] == FN_LIBCHAR)
+-    {
+-      /* 1. my_progname contains full path */
+-      strmake(path, my_progname, FN_REFLEN);
+-    }
+-    else if (my_progname[0] == '.')
+-    {
+-      /* 2. my_progname contains relative path, prepend wd */
+-      char buf[FN_REFLEN];
+-      my_getwd(buf, FN_REFLEN, MYF(0));
+-      my_snprintf(path, FN_REFLEN, "%s%s", buf, my_progname);
+-    }
+-    else
+-    {
+-      /* 3. Just go for it and hope tool is in path */
+-      path[0]= 0;
+-    }
+-  }
+-  do
+-  {
+-    size_t path_len;
+-    DBUG_PRINT("enter", ("path: %s", path));
+-
+-    /* Chop off last char(since it might be a /) */
+-    path[max((strlen(path)-1), 0)]= 0;
+-
+-    /* Chop off last dir part */
+-    dirname_part(path, path, &path_len);
+-
+-    /* Format name of the tool to search for */
+-    fn_format(tool_path, tool_name,
+-              path, "", MYF(MY_REPLACE_DIR));
+-
+-    verbose("Looking for '%s' in: %s", tool_name, tool_path);
+-
+-    /* Make sure the tool exists */
+-    if (my_access(tool_path, F_OK) != 0)
+-      die("Can't find '%s'", tool_path);
+-
+-    /*
+-      Make sure it can be executed, otherwise try again
+-      in higher level directory
+-    */
+-  }
+-  while(run_tool(tool_path,
+-                 &ds_tmp, /* Get output from command, discard*/
+-                 "--help",
+-                 "2>&1",
+-                 IF_WIN("> NUL", "> /dev/null"),
+-                 NULL));
+-
+-  dynstr_free(&ds_tmp);
+-
+-  DBUG_VOID_RETURN;
+-}
+-
+-
+ /*
+   Run query using "mysql"
+ */
+@@ -758,12 +673,6 @@
+   dynstr_append_os_quoted(&ds_args, "--user=", opt_user, NullS);
+   dynstr_append(&ds_args, " ");
+-  /* Find mysql */
+-  find_tool(mysql_path, IF_WIN("mysql.exe", "mysql"));
+-
+-  /* Find mysqlcheck */
+-  find_tool(mysqlcheck_path, IF_WIN("mysqlcheck.exe", "mysqlcheck"));
+-
+   /*
+     Read the mysql_upgrade_info file to check if mysql_upgrade
+     already has been run for this installation of MySQL
This page took 0.058289 seconds and 4 git commands to generate.