summaryrefslogtreecommitdiff
path: root/mysql-test/include/kill_and_restart_mysqld.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include/kill_and_restart_mysqld.inc')
-rw-r--r--mysql-test/include/kill_and_restart_mysqld.inc19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/include/kill_and_restart_mysqld.inc b/mysql-test/include/kill_and_restart_mysqld.inc
new file mode 100644
index 00000000000..f2ac9b504d2
--- /dev/null
+++ b/mysql-test/include/kill_and_restart_mysqld.inc
@@ -0,0 +1,19 @@
+--let $_server_id= `SELECT @@server_id`
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
+
+if ($restart_parameters)
+{
+ --echo # Kill and restart: $restart_parameters
+ --exec echo "restart: $restart_parameters" > $_expect_file_name
+}
+if (!$restart_parameters)
+{
+ --echo # Kill and restart
+ --exec echo "restart" > $_expect_file_name
+}
+
+--shutdown_server 0
+--source include/wait_until_disconnected.inc
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--disable_reconnect