From 1eb364f8b3d623fdeca96a7ecf4a315282c83716 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Wed, 10 Oct 2018 17:16:34 +0200 Subject: MDEV-17421: mtr does not restart the server whose parameters were changed If a mtr test runs multiple servers and only some of them get restarted on whatever reason with new command-line parameters, then subsequent mtr test may fail, because no cleanup is performed. Replication and Galera test suites are affected. In the mtr script, there is a server_need_restart function that decides whether we need to start a new mysqld process before the new (next) test. If the mysqld parameters were changed in the previous test - not necessarily the parameters of the primary mysqld server, maybe even the secondary server parameters - this function decides to start a new mysqld process. But since it does not remove the old (changed) parameters, the new process starts with the parameters changed by the *previous* test. To correct this error, we must delete the modified process parameters after checking that they have been changed during the previous test. This patch also simplifies and makes more stable the galera_drop_database test, during debugging of which this problem was detected. https://jira.mariadb.org/browse/MDEV-17421 --- mysql-test/suite/rpl/r/mtr_restart_t1.result | 5 +++++ mysql-test/suite/rpl/r/mtr_restart_t2.result | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 mysql-test/suite/rpl/r/mtr_restart_t1.result create mode 100644 mysql-test/suite/rpl/r/mtr_restart_t2.result (limited to 'mysql-test/suite/rpl/r') diff --git a/mysql-test/suite/rpl/r/mtr_restart_t1.result b/mysql-test/suite/rpl/r/mtr_restart_t1.result new file mode 100644 index 00000000000..56b64a2fc70 --- /dev/null +++ b/mysql-test/suite/rpl/r/mtr_restart_t1.result @@ -0,0 +1,5 @@ +include/master-slave.inc +[connection master] +include/rpl_stop_server.inc [server_number=1] +new auto_increment_offset=111 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/mtr_restart_t2.result b/mysql-test/suite/rpl/r/mtr_restart_t2.result new file mode 100644 index 00000000000..3c8fe59d607 --- /dev/null +++ b/mysql-test/suite/rpl/r/mtr_restart_t2.result @@ -0,0 +1,4 @@ +include/master-slave.inc +[connection master] +auto_increment_offset=1 +include/rpl_end.inc -- cgit v1.2.1