Commit fb0a1b33 authored by unknown's avatar unknown

client/mysqltest.c

    add --result-file option
mysql-test/mysql-test-run
    do a really good job to kill mysqld if it is stuck


client/mysqltest.c:
  add --result-file option
mysql-test/mysql-test-run:
  do a really good job to kill mysqld if it is stuck
parent 6be226bd
This diff is collapsed.
...@@ -361,6 +361,18 @@ stop_slave () ...@@ -361,6 +361,18 @@ stop_slave ()
if [ x$SLAVE_RUNNING = x1 ] if [ x$SLAVE_RUNNING = x1 ]
then then
$MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root shutdown $MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root shutdown
if [ $? != 0 ] ; then # try harder!
echo "slave not cooperating with mysqladmin, will try manual kill"
kill `cat $SLAVE_MYPID`
sleep 2
if [ -f $SLAVE_MYPID ] ; then
echo "slave refused to die, resorting to SIGKILL murder"
kill -9 `cat $SLAVE_MYPID`
rm -f $SLAVE_MYPID
else
echo "slave responded to SIGTERM "
fi
fi
SLAVE_RUNNING=0 SLAVE_RUNNING=0
fi fi
} }
...@@ -370,6 +382,18 @@ stop_master () ...@@ -370,6 +382,18 @@ stop_master ()
if [ x$MASTER_RUNNING = x1 ] if [ x$MASTER_RUNNING = x1 ]
then then
$MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root shutdown $MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root shutdown
if [ $? != 0 ] ; then # try harder!
echo "master not cooperating with mysqladmin, will try manual kill"
kill `cat $MASTER_MYPID`
sleep 2
if [ -f $MASTER_MYPID ] ; then
echo "master refused to die, resorting to SIGKILL murder"
kill -9 `cat $MASTER_MYPID`
rm -f $MASTER_MYPID
else
echo "master responded to SIGTERM "
fi
fi
MASTER_RUNNING=0 MASTER_RUNNING=0
fi fi
} }
......
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