MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:March 25 2008 8:19am
Subject:bk commit into 5.1 tree (msvensson:1.2580)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson.  When msvensson does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-03-25 09:19:03+01:00, msvensson@stripped +1 -0
  Find mysqld binary from it's basedir

  mysql-test/mysql-test-run.pl@stripped, 2008-03-25 09:19:00+01:00, msvensson@stripped +22 -24
    Find mysqld binary from it's basedir

diff -Nrup a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
--- a/mysql-test/mysql-test-run.pl	2008-03-14 13:59:41 +01:00
+++ b/mysql-test/mysql-test-run.pl	2008-03-25 09:19:00 +01:00
@@ -90,7 +90,6 @@ our $opt_suites= $DEFAULT_SUITES;
 our $opt_verbose= 0;  # Verbose output, enable with --verbose
 our $opt_verbose_restart= 0;  # Verbose output for restarts
 
-my $exe_mysqld;
 our $exe_mysql;
 our $exe_mysqladmin;
 our $exe_mysqltest;
@@ -416,11 +415,6 @@ sub command_line_setup {
     $basedir= dirname($basedir);
   }
 
-  #
-  # Find the mysqld executable to be able to find the mysqld version
-  # number as early as possible
-  #
-
   # Look for the client binaries directory
   if ($path_client_bindir)
   {
@@ -456,20 +450,7 @@ sub command_line_setup {
 				   "$basedir/scripts");
   }
 
-  $exe_mysqld=       mtr_exe_exists (vs_config_dirs('sql', 'mysqld'),
-				     vs_config_dirs('sql', 'mysqld-debug'),
-				     "$basedir/sql/mysqld",
-				     "$path_client_bindir/mysqld-max-nt",
-				     "$path_client_bindir/mysqld-max",
-				     "$path_client_bindir/mysqld-nt",
-				     "$path_client_bindir/mysqld",
-				     "$path_client_bindir/mysqld-debug",
-				     "$path_client_bindir/mysqld-max",
-				     "$basedir/libexec/mysqld",
-				     "$basedir/bin/mysqld",
-				     "$basedir/sbin/mysqld");
-
-  # Use the mysqld found above to find out what features are available
+  # Run the mysqld to find out what features are available
   collect_mysqld_features();
 
   if ( $opt_comment )
@@ -809,6 +790,7 @@ sub collect_mysqld_features {
   mtr_add_arg($args, "--verbose");
   mtr_add_arg($args, "--help");
 
+  my $exe_mysqld= find_mysqld($basedir);
   my $cmd= join(" ", $exe_mysqld, @$args);
   my $list= `$cmd`;
 
@@ -872,6 +854,24 @@ sub collect_mysqld_features {
 }
 
 
+sub find_mysqld {
+  my ($mysqld_basedir)= @_;
+
+  my @mysqld_names= ("mysqld", "mysqld-max-nt", "mysqld-max",
+		     "mysqld-nt");
+
+  if ( $opt_debug ){
+    # Put mysqld-debug first in the list of binaries to look for
+    mtr_verbose("Adding mysqld-debug first in list of binaries to look for");
+    unshift(@mysqld_names, "mysqld-debug");
+  }
+
+  return my_find_bin($mysqld_basedir,
+		     ["sql", "libexec", "sbin"],
+		     [@mysqld_names]);
+}
+
+
 sub executable_setup () {
 
   #
@@ -889,7 +889,6 @@ sub executable_setup () {
     }
   }
 
-
   # Look for the client binaries
   $exe_mysqladmin=     mtr_exe_exists("$path_client_bindir/mysqladmin");
   $exe_mysql=          mtr_exe_exists("$path_client_bindir/mysql");
@@ -929,7 +928,6 @@ sub executable_setup () {
 }
 
 
-
 sub client_debug_arg($$) {
   my ($args, $client_name)= @_;
 
@@ -2004,7 +2002,7 @@ sub mysql_install_db {
   # --bootstrap or --skip-grant-tables options.  The user can set
   # MYSQLD_BOOTSTRAP to the full path to a mysqld which does accept
   # --bootstrap, to accommodate this.
-  my $exe_mysqld_bootstrap = $ENV{'MYSQLD_BOOTSTRAP'} || $exe_mysqld;
+  my $exe_mysqld_bootstrap = $ENV{'MYSQLD_BOOTSTRAP'} || find_mysqld($basedir);
 
   # ----------------------------------------------------------------------
   # export MYSQLD_BOOTSTRAP_CMD variable containing <path>/mysqld <args>
@@ -2673,7 +2671,7 @@ sub mysqld_start ($$) {
 
   mtr_verbose(My::Options::toStr("mysqld_start", @$extra_opts));
 
-  my $exe= $exe_mysqld;
+  my $exe= find_mysqld($mysqld->value('basedir'));
   my $wait_for_pid_file= 1;
 
   mtr_error("Internal error: mysqld should never be started for embedded")
Thread
bk commit into 5.1 tree (msvensson:1.2580)msvensson25 Mar