Commit aad954bb authored by unknown's avatar unknown

Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug25341/my51-bug25341

into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


BitKeeper/etc/collapsed:
  auto-union
parents 749c110d 32fd9b20
...@@ -33,6 +33,12 @@ ...@@ -33,6 +33,12 @@
4561bde4qWhz1I8tkItXKex5uniipA 4561bde4qWhz1I8tkItXKex5uniipA
4562ba016dYH0JzszOqZ8p6psbKfnQ 4562ba016dYH0JzszOqZ8p6psbKfnQ
45771031yRCoM_ZfONdYchPvVEgLRg 45771031yRCoM_ZfONdYchPvVEgLRg
459a60d8rIxeTuhB3j_QsOwLGdcpng
459a61c9OS8PzIsdviZJDkybJ1y1uA
459a70691aYIfU2ohV0a3P5iTLpO2A
459a7422KF_P7PuU3YQ5qG6ZLEVpiA
459a74e4nRcXppMSBYeQQ5efDkTADg
45ae6628gqKTsUFfnoNExadETVIkbA 45ae6628gqKTsUFfnoNExadETVIkbA
45ba4faf2oqu6eR8fqecR3LfSNcYUg 45ba4faf2oqu6eR8fqecR3LfSNcYUg
45ba5238-NKl80QVXzdGo8hO9M75Xg 45ba5238-NKl80QVXzdGo8hO9M75Xg
45c0fdfb2mz6NdOIsLenJtf6_ZelTA
...@@ -143,11 +143,12 @@ parse_manager_arguments() { ...@@ -143,11 +143,12 @@ parse_manager_arguments() {
wait_for_pid () { wait_for_pid () {
i=0 i=0
while test $i -lt 35 ; do while test $i -lt 900 ; do
sleep 1 sleep 1
case "$1" in case "$1" in
'created') 'created')
test -s $pid_file && i='' && break test -s $pid_file && i='' && break
kill -0 $2 || break # if the program goes away, stop waiting
;; ;;
'removed') 'removed')
test ! -s $pid_file && i='' && break test ! -s $pid_file && i='' && break
...@@ -163,8 +164,10 @@ wait_for_pid () { ...@@ -163,8 +164,10 @@ wait_for_pid () {
if test -z "$i" ; then if test -z "$i" ; then
log_success_msg log_success_msg
return 0
else else
log_failure_msg log_failure_msg
return 1
fi fi
} }
...@@ -280,26 +283,28 @@ case "$mode" in ...@@ -280,26 +283,28 @@ case "$mode" in
--mysqld-safe-compatible \ --mysqld-safe-compatible \
--user="$user" \ --user="$user" \
--pid-file="$pid_file" >/dev/null 2>&1 & --pid-file="$pid_file" >/dev/null 2>&1 &
wait_for_pid created wait_for_pid created $!; return_value=$?
# Make lock for RedHat / SuSE # Make lock for RedHat / SuSE
if test -w /var/lock/subsys if test -w /var/lock/subsys
then then
touch /var/lock/subsys/mysqlmanager touch /var/lock/subsys/mysqlmanager
fi fi
exit $return_value
elif test -x $bindir/mysqld_safe elif test -x $bindir/mysqld_safe
then then
# Give extra arguments to mysqld with the my.cnf file. This script # Give extra arguments to mysqld with the my.cnf file. This script
# may be overwritten at next upgrade. # may be overwritten at next upgrade.
pid_file=$server_pid_file pid_file=$server_pid_file
$bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 & $bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 &
wait_for_pid created wait_for_pid created $!; return_value=$?
# Make lock for RedHat / SuSE # Make lock for RedHat / SuSE
if test -w /var/lock/subsys if test -w /var/lock/subsys
then then
touch /var/lock/subsys/mysql touch /var/lock/subsys/mysql
fi fi
exit $return_value
else else
log_failure_msg "Couldn't find MySQL manager or server" log_failure_msg "Couldn't find MySQL manager or server"
fi fi
...@@ -325,13 +330,14 @@ case "$mode" in ...@@ -325,13 +330,14 @@ case "$mode" in
echo $echo_n "Shutting down MySQL" echo $echo_n "Shutting down MySQL"
kill $mysqlmanager_pid kill $mysqlmanager_pid
# mysqlmanager should remove the pid_file when it exits, so wait for it. # mysqlmanager should remove the pid_file when it exits, so wait for it.
wait_for_pid removed wait_for_pid removed; return_value=$?
# delete lock for RedHat / SuSE # delete lock for RedHat / SuSE
if test -f $lock_dir if test -f $lock_dir
then then
rm -f $lock_dir rm -f $lock_dir
fi fi
exit $return_value
else else
log_failure_msg "MySQL manager or server PID file could not be found!" log_failure_msg "MySQL manager or server PID file could not be found!"
fi fi
...@@ -340,8 +346,12 @@ case "$mode" in ...@@ -340,8 +346,12 @@ case "$mode" in
'restart') 'restart')
# Stop the service and regardless of whether it was # Stop the service and regardless of whether it was
# running or not, start it again. # running or not, start it again.
$0 stop $other_args if $0 stop $other_args; then
$0 start $other_args $0 start $other_args
else
log_failure_msg "Failed to stop running server, so refusing to try to start."
exit 1
fi
;; ;;
'reload') 'reload')
...@@ -360,3 +370,5 @@ case "$mode" in ...@@ -360,3 +370,5 @@ case "$mode" in
exit 1 exit 1
;; ;;
esac esac
exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment