Fix to ignore mysqld_safe.pid

parent 1f6434ba
...@@ -636,7 +636,7 @@ then ...@@ -636,7 +636,7 @@ then
fi fi
if [ -z "$PID_FILE_PATT" ] if [ -z "$PID_FILE_PATT" ]
then then
PID_FILE_PATT=`ls "$mysql_datadir/*.pid" 2> /dev/null | grep -v "mysqld_safe.pid"` PID_FILE_PATT="$mysql_datadir/*.pid"
fi fi
# Check if we can safely upgrade. An upgrade is only safe if it's from one # Check if we can safely upgrade. An upgrade is only safe if it's from one
...@@ -718,7 +718,7 @@ fi ...@@ -718,7 +718,7 @@ fi
# We assume that if there is exactly one ".pid" file, # We assume that if there is exactly one ".pid" file,
# it contains the valid PID of a running MySQL server. # it contains the valid PID of a running MySQL server.
NR_PID_FILES=`ls $PID_FILE_PATT 2>/dev/null | wc -l` NR_PID_FILES=`ls $PID_FILE_PATT 2>/dev/null | grep -v "mysqld_safe.pid" | wc -l`
case $NR_PID_FILES in case $NR_PID_FILES in
0 ) SERVER_TO_START='' ;; # No "*.pid" file == no running server 0 ) SERVER_TO_START='' ;; # No "*.pid" file == no running server
1 ) SERVER_TO_START='true' ;; 1 ) SERVER_TO_START='true' ;;
......
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