summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/ac-macros/misc.m44
-rw-r--r--scripts/make_binary_distribution.sh59
-rw-r--r--[-rwxr-xr-x]sql-bench/README0
-rw-r--r--support-files/mysql.server.sh17
-rwxr-xr-x[-rw-r--r--]tests/grant.pl0
5 files changed, 70 insertions, 10 deletions
diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4
index 2e62a4b3c88..1eec0e9e18c 100644
--- a/config/ac-macros/misc.m4
+++ b/config/ac-macros/misc.m4
@@ -456,6 +456,10 @@ fi
AC_DEFUN([MYSQL_STACK_DIRECTION],
[AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
[AC_TRY_RUN([#include <stdlib.h>
+ /* Prevent compiler optimization by HP's compiler, see bug#42213 */
+#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
+#pragma noinline
+#endif
int find_stack_direction ()
{
static char *addr = 0;
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 152225f86b1..bc54dc7062f 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -56,6 +56,12 @@ SOURCE=`pwd`
CP="cp -p"
MV="mv"
+# There are platforms, notably OS X on Intel (x86 + x86_64),
+# for which "uname" does not provide sufficient information.
+# The value of CFLAGS as used during compilation is the most exact info
+# we can get - after all, we care about _what_ we built, not _where_ we did it.
+cflags="@CFLAGS@"
+
STRIP=1 # Option ignored
SILENT=0
PLATFORM=""
@@ -104,7 +110,50 @@ if [ x"$PLATFORM" = x"" ] ; then
system=`echo $system | sed -e 's/linux-gnu/linux/g'`
system=`echo $system | sed -e 's/solaris2.\([0-9]*\)/solaris\1/g'`
system=`echo $system | sed -e 's/sco3.2v\(.*\)/openserver\1/g'`
+fi
+
+# Get the "machine", which really is the CPU architecture (including the size).
+# The precedence is:
+# 1) use an explicit argument, if given;
+# 2) use platform-specific fixes, if there are any (see bug#37808);
+# 3) stay with the default (determined during "configure", using predefined macros).
+
+if [ x"$MACHINE" != x"" ] ; then
+ machine=$MACHINE
+else
+ case $system in
+ osx* )
+ # Extract "XYZ" from CFLAGS "... -arch XYZ ...", or empty!
+ cflag_arch=`echo "$cflags" | sed -n -e 's=.* -arch \([^ ]*\) .*=\1=p'`
+ case "$cflag_arch" in
+ i386 ) case $system in
+ osx10.4 ) machine=i686 ;; # Used a different naming
+ * ) machine=x86 ;;
+ esac ;;
+ x86_64 ) machine=x86_64 ;;
+ ppc ) ;; # No treatment needed with PPC
+ ppc64 ) ;;
+ * ) # No matching compiler flag? "--platform" is needed
+ if [ x"$PLATFORM" != x"" ] ; then
+ : # See below: "$PLATFORM" will take precedence anyway
+ elif [ "$system" = "osx10.3" -a -z "$cflag_arch" ] ; then
+ : # Special case of OS X 10.3, which is PPC-32 only and doesn't use "-arch"
+ else
+ echo "On system '$system' only specific '-arch' values are expected."
+ echo "It is taken from the 'CFLAGS' whose value is:"
+ echo "$cflags"
+ echo "'-arch $cflag_arch' is unexpected, and no '--platform' was given: ABORT"
+ exit 1
+ fi ;;
+ esac # "$cflag_arch"
+ ;;
+ esac # $system
+fi
+# Combine OS and CPU to the "platform". Again, an explicit argument takes precedence.
+if [ x"$PLATFORM" != x"" ] ; then
+ :
+else
PLATFORM="$system-$machine"
fi
@@ -153,10 +202,10 @@ which_1 ()
do
for file in $d/$cmd
do
- if [ -x $file -a ! -d $file ] ; then
- echo $file
- exit 0
- fi
+ if [ -x $file -a ! -d $file ] ; then
+ echo $file
+ exit 0
+ fi
done
done
done
@@ -460,7 +509,7 @@ rm -f $BASE/support-files/magic \
$BASE/support-files/mysql-log-rotate \
$BASE/support-files/binary-configure \
$BASE/support-files/build-tags \
- $BASE/support-files/MySQL-shared-compat.spec \
+ $BASE/support-files/MySQL-shared-compat.spec \
$BASE/INSTALL-BINARY
# Clean up if we did this from a bk tree
diff --git a/sql-bench/README b/sql-bench/README
index 431659a8756..431659a8756 100755..100644
--- a/sql-bench/README
+++ b/sql-bench/README
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index bbd93b8f746..87198fc9cf5 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -358,11 +358,18 @@ case "$mode" in
if test -s "$pid_file"
then
mysqlmanager_pid=`cat $pid_file`
- echo $echo_n "Shutting down MySQL"
- kill $mysqlmanager_pid
- # mysqlmanager should remove the pid_file when it exits, so wait for it.
- wait_for_pid removed "$mysqlmanager_pid"; return_value=$?
-
+
+ if (kill -0 $mysqlmanager_pid 2>/dev/null)
+ then
+ echo $echo_n "Shutting down MySQL"
+ kill $mysqlmanager_pid
+ # mysqlmanager should remove the pid_file when it exits, so wait for it.
+ wait_for_pid removed "$mysqlmanager_pid"; return_value=$?
+ else
+ log_failure_msg "MySQL manager or server process #$mysqlmanager_pid is not running!"
+ rm $pid_file
+ fi
+
# delete lock for RedHat / SuSE
if test -f $lock_dir
then
diff --git a/tests/grant.pl b/tests/grant.pl
index 4f2bd1a61cb..4f2bd1a61cb 100644..100755
--- a/tests/grant.pl
+++ b/tests/grant.pl