From 2c46e2a7ec78e72c88ce86bf320f30a7309c80f0 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Mon, 18 Dec 2017 10:58:09 +0200 Subject: [PATCH] Ensure slave not running when reseting With this change it is ensured that you do not see ERROR 1198 (HY000) at line 28: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first when the slave is reset. --- maxscale-system-test/mariadb_nodes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/maxscale-system-test/mariadb_nodes.cpp b/maxscale-system-test/mariadb_nodes.cpp index 79718de32..9cc2b083b 100644 --- a/maxscale-system-test/mariadb_nodes.cpp +++ b/maxscale-system-test/mariadb_nodes.cpp @@ -376,6 +376,8 @@ int Mariadb_nodes::start_replication() printf("Starting node %d\n", i); fflush(stdout); copy_to_node_legacy(str, "/tmp/master_backup.sql", i); + ssh_node_f(i, true, "mysql --force -u root %s -e \"STOP SLAVE;\"", + socket_cmd[i]); ssh_node_f(i, true, "mysql --force -u root %s < /tmp/master_backup.sql", socket_cmd[i]); ssh_node_f(i, true, "mysql --force -u root %s -e \"CHANGE MASTER TO MASTER_HOST=\\\"%s\\\", MASTER_PORT=%d, "