Comment 7 for bug 1226850

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Yes Monty, I have checked and found below logic is missing in Percona RPM (5.1.71-rel14.9.589)

if [ -n "$SERVER_TO_START" ] ; then
                # There is only one PID file, race possibility ignored
                echo "PID file:" >> $STATUS_FILE
                ls -l $mysql_datadir/*.pid >> $STATUS_FILE
                cat $mysql_datadir/*.pid >> $STATUS_FILE
                echo >> $STATUS_FILE
                echo "Server process:" >> $STATUS_FILE
                ps -fp `cat $mysql_datadir/*.pid` >> $STATUS_FILE
                echo >> $STATUS_FILE
                echo "SERVER_TO_START=$SERVER_TO_START" >> $STATUS_FILE
        else
                # Take a note we checked it ...
                echo "PID file:" >> $STATUS_FILE
                ls -l $mysql_datadir/*.pid >> $STATUS_FILE 2>&1
        fi

if [ -f $STATUS_FILE ] ; then
        SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-`
else
        SERVER_TO_START='true' # This is for 5.1 only, to not change behavior
fi

if [ "$SERVER_TO_START" = "true" ] ; then
        # Restart in the same way that mysqld will be started normally.
        if [ -x /etc/init.d/mysql ] ; then
                /etc/init.d/mysql start
                echo "Giving mysqld 2 seconds to start"
                sleep 2
        fi

        # Allow mysqld_safe to start mysqld and print a message before we exit
        sleep 2
fi