summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/binlog_encryption/restart_server.inc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/binlog_encryption/restart_server.inc
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/binlog_encryption/restart_server.inc')
-rw-r--r--mysql-test/suite/binlog_encryption/restart_server.inc35
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/suite/binlog_encryption/restart_server.inc b/mysql-test/suite/binlog_encryption/restart_server.inc
new file mode 100644
index 00000000..8f0fe7d8
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/restart_server.inc
@@ -0,0 +1,35 @@
+#
+# We can not use the common include/restart_mysqld.inc or include/rpl_restart_server.inc,
+# because they have hardcoded connection names (master, master1)
+# which are not initiated by rpl_init.inc.
+# This is the relevant and simplified part of the same set of scripts.
+#
+# ==== Usage ====
+#
+# --let $rpl_server_number= N
+# Number to identify the server that needs to reconnect.
+# 1 is the master server, 2 the slave server
+# [--let $rpl_server_parameters= --flag1 --flag2 ...]
+# --source restart_server.inc
+#
+
+--let $_cur_con= $CURRENT_CONNECTION
+
+--connection default
+--enable_reconnect
+
+--connection $_cur_con
+--enable_reconnect
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
+
+shutdown_server;
+
+--source include/wait_until_disconnected.inc
+
+--let $_rpl_start_server_command= restart
+if ($rpl_server_parameters)
+{
+ --let $_rpl_start_server_command= restart:$rpl_server_parameters
+}
+--exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
+--source include/wait_until_connected_again.inc