From 8d7f44388bbd1d5197447c578979d31f0253f32d Mon Sep 17 00:00:00 2001
From: unknown <kent@mysql.com>
Date: Thu, 2 Mar 2006 22:53:38 +0100
Subject: [PATCH] mysql-test-run.pl:   Try find in order 'mysqld-nt', 'mysqld',
 'mysqld-debug' and 'mysqld-max' mysqld_safe.sh:   Don't try 'mysqld-max'
 before 'mysqld' if no server given, bug#17861

scripts/mysqld_safe.sh:
  Don't try 'mysqld-max' before 'mysqld' if no server given, bug#17861
mysql-test/mysql-test-run.pl:
  Try find in order 'mysqld-nt', 'mysqld', 'mysqld-debug' and 'mysqld-max'
---
 mysql-test/mysql-test-run.pl | 4 ++--
 scripts/mysqld_safe.sh       | 9 ++-------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 73a951fff8..44b8a1346d 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -987,10 +987,10 @@ sub executable_setup () {
                                            # New CMake locations.
                                            "$glob_basedir/client/release",
                                            "$glob_basedir/client/debug");
-      $exe_mysqld=         mtr_exe_exists ("$path_client_bindir/mysqld-max",
-                                           "$path_client_bindir/mysqld-nt",
+      $exe_mysqld=         mtr_exe_exists ("$path_client_bindir/mysqld-nt",
                                            "$path_client_bindir/mysqld",
                                            "$path_client_bindir/mysqld-debug",
+                                           "$path_client_bindir/mysqld-max",
                                            "$glob_basedir/sql/release/mysqld",
                                            "$glob_basedir/sql/debug/mysqld");
       $path_language=      mtr_path_exists("$glob_basedir/share/english/",
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index a584c38471..83bc8ce895 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -213,15 +213,10 @@ then
   chown $user $mysql_unix_port_dir
 fi
 
-# Use the mysqld-max binary by default if the user doesn't specify a binary
+# If the user doesn't specify a binary, we assume name "mysqld"
 if test -z "$MYSQLD"
 then
-  if test -x $ledir/mysqld-max
-  then
-    MYSQLD=mysqld-max
-  else
-    MYSQLD=mysqld
-  fi
+  MYSQLD=mysqld
 fi
 
 if test ! -x $ledir/$MYSQLD
-- 
2.30.9