diff options
author | unknown <monty@mishka.local> | 2005-04-16 10:53:30 +0300 |
---|---|---|
committer | unknown <monty@mishka.local> | 2005-04-16 10:53:30 +0300 |
commit | 48faa137af3d610228041d221363a3e574c137f8 (patch) | |
tree | a671e7e830d1281e3ff4bd54043017e0c63e298b /support-files | |
parent | 2be63528bc0f7d524df4660cea4fcc002604c42e (diff) | |
download | mariadb-git-48faa137af3d610228041d221363a3e574c137f8.tar.gz |
Added more rows to test to get predictable results
mysql-test/t/range.test:
Added more rows to test to get predictable results
(if it still fails, we need to add even more rows)
scripts/make_binary_distribution.sh:
Apply Jims patch for mysql.server
support-files/mysql.server.sh:
Apply Jims patch to support mysqld_safe
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/mysql.server.sh | 80 |
1 files changed, 68 insertions, 12 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index a03e870004d..04fd9a312da 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -48,15 +48,19 @@ datadir= # Set some defaults pid_file= +server_pid_file= +user=@MYSQLD_USER@ if test -z "$basedir" then basedir=@prefix@ bindir=@bindir@ datadir=@localstatedir@ sbindir=@sbindir@ + libexecdir=@libexecdir@ else bindir="$basedir/bin" - sbindir="$basedir/sbin" + sbindir="$basedir/bin" + libexecdir="$basedir/bin" fi # @@ -92,6 +96,8 @@ parse_server_arguments() { case "$arg" in --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; + --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; + --pid-file=*) server_pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; esac done } @@ -100,6 +106,7 @@ parse_manager_arguments() { for arg do case "$arg" in --pid-file=*) pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; + --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; esac done } @@ -181,7 +188,7 @@ then extra_args="-e $datadir/my.cnf" fi -parse_server_arguments `$print_defaults $extra_args mysqld` +parse_server_arguments `$print_defaults $extra_args mysqld server mysql_server mysql.server` # Look for the pidfile parse_manager_arguments `$print_defaults $extra_args manager` @@ -198,9 +205,15 @@ else * ) pid_file="$datadir/$pid_file" ;; esac fi - -user=@MYSQLD_USER@ -USER_OPTION="--user=$user" +if test -z "$server_pid_file" +then + server_pid_file=$datadir/`@HOSTNAME@`.pid +else + case "$server_pid_file" in + /* ) ;; + * ) server_pid_file="$datadir/$server_pid_file" ;; + esac +fi # Safeguard (relative paths, core dumps..) cd $basedir @@ -209,12 +222,21 @@ case "$mode" in 'start') # Start daemon - if test -x $sbindir/mysqlmanager + manager=$bindir/mysqlmanager + if test -x $libexecdir/mysqlmanager + then + manager=$libexecdir/mysqlmanager + elif test -x $bindir/mysqlmanager + then + manager=$sbindir/mysqlmanager + fi + + if test -x $manager then # Give extra arguments to mysqld with the my.cnf file. This script may # be overwritten at next upgrade. echo $echo_n "Starting MySQL" - $sbindir/mysqlmanager $USER_OPTION --pid-file=$pid_file >/dev/null 2>&1 & + $manager --user=$user --pid-file=$pid_file >/dev/null 2>&1 & wait_for_pid created # Make lock for RedHat / SuSE @@ -222,14 +244,38 @@ case "$mode" in then touch /var/lock/subsys/mysqlmanager fi + elif test -x $bindir/mysqld_safe + then + # Give extra arguments to mysqld with the my.cnf file. This script may be overwritten at next upgrade. + echo $echo_n "Starting MySQL" + pid_file=$server_pid_file + $bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file >/dev/null 2>&1 & + wait_for_pid created + + # Make lock for RedHat / SuSE + if test -w /var/lock/subsys + then + touch /var/lock/subsys/mysql + fi else - log_failure_msg "Can't execute $sbindir/mysqlmanager" + log_failure_msg "Couldn't find MySQL manager or server" fi ;; 'stop') # Stop daemon. We use a signal here to avoid having to know the # root password. + + # The RedHat / SuSE lock directory to remove + lock_dir=/var/lock/subsys/mysqlmanager + + # If the manager pid_file doesn't exist, try the server's + if test ! -s "$pid_file" + then + pid_file=$server_pid_file + lock_dir=/var/lock/subsys/mysql + fi + if test -s "$pid_file" then mysqlmanager_pid=`cat $pid_file` @@ -239,12 +285,12 @@ case "$mode" in wait_for_pid removed # delete lock for RedHat / SuSE - if test -f /var/lock/subsys/mysqlmanager + if test -f $lock_dir then - rm -f /var/lock/subsys/mysqlmanager + rm -f $lock_dir fi else - log_failure_msg "mysqlmanager PID file could not be found!" + log_failure_msg "MySQL manager or server PID file could not be found!" fi ;; @@ -255,9 +301,19 @@ case "$mode" in $0 start ;; + 'reload') + if test -s "$server_pid_file" ; then + mysqld_pid=`cat $server_pid_file` + kill -HUP $mysqld_pid && log_success_msg "Reloading service MySQL" + touch $server_pid_file + else + log_failure_msg "MySQL PID file could not be found!" + fi + ;; + *) # usage - echo "Usage: $0 start|stop|restart" + echo "Usage: $0 start|stop|restart|reload" exit 1 ;; esac |