diff options
author | unknown <sasha@mysql.sashanet.com> | 2000-12-12 12:12:41 -0700 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2000-12-12 12:12:41 -0700 |
commit | 078c05d50a60871d49f754c0241bf47d4407327f (patch) | |
tree | 982acf7a74d794e3241181648d96450854156f76 /mysql-test | |
parent | 2ce474dc658a42ad1bf6e8f5842babb5a86dd333 (diff) | |
download | mariadb-git-078c05d50a60871d49f754c0241bf47d4407327f.tar.gz |
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
Diffstat (limited to 'mysql-test')
-rwxr-xr-x | mysql-test/mysql-test-run | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/mysql-test-run b/mysql-test/mysql-test-run index 2cece3f3312..37fa3f3d471 100755 --- a/mysql-test/mysql-test-run +++ b/mysql-test/mysql-test-run @@ -361,6 +361,18 @@ stop_slave () if [ x$SLAVE_RUNNING = x1 ] then $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 fi } @@ -370,6 +382,18 @@ stop_master () if [ x$MASTER_RUNNING = x1 ] then $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 fi } |