summaryrefslogtreecommitdiff
path: root/mysql-test/include/restart_mysqld.inc
diff options
context:
space:
mode:
authorMagnus Svensson <msvensson@mysql.com>2008-08-09 11:16:12 +0200
committerMagnus Svensson <msvensson@mysql.com>2008-08-09 11:16:12 +0200
commitcd0cd4e0a01d7b81ea6607e6e84b268bdc43562a (patch)
tree077747178343172e87a9845f2d6db8e806d1658a /mysql-test/include/restart_mysqld.inc
parent5a9938e584132b46fa4820abade187c487a0062b (diff)
downloadmariadb-git-cd0cd4e0a01d7b81ea6607e6e84b268bdc43562a.tar.gz
Make events_restart more stable by waiting for the server to be stopped before starting it again
Diffstat (limited to 'mysql-test/include/restart_mysqld.inc')
-rw-r--r--mysql-test/include/restart_mysqld.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc
index 049827c7a81..30b6c7ce70f 100644
--- a/mysql-test/include/restart_mysqld.inc
+++ b/mysql-test/include/restart_mysqld.inc
@@ -1,13 +1,21 @@
-# Write file to make mysql-test-run.pl expect crash and restart
+# Write file to make mysql-test-run.pl expect the "crash", but don't start
+# it until it's told to
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-restart
+wait
EOF
# Send shutdown to the connected server and give
# it 10 seconds to die before zapping it
shutdown_server 10;
+# Check server is gone
+--source include/wait_until_disconnected.inc
+
+# Write file to make mysql-test-run.pl start up the server again
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+restart
+EOF
# Turn on reconnect
--enable_reconnect