From 4eebf431b07b93cc05e1b15f1e77b6cfcdcf737f Mon Sep 17 00:00:00 2001 From: Kristian Nielsen Date: Fri, 24 Mar 2017 11:51:23 +0100 Subject: [PATCH] Fix that MTR leaks restart: options to following test This was found during MDEV-12179 development, but unrelated so put in its own commit. The "restart: --extra-option" facility in expect file for server restart sets extra options for the restarted mysqld. These options were incorrectly not cleared when starting a new test case, so the server was restarted with whatever extra options were left by the previous testcase, causing random failures depending on order of running tests. --- mysql-test/mysql-test-run.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 296a646d9ba..15ac72a838c 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -5215,6 +5215,7 @@ sub server_need_restart { if (!My::Options::same($started_opts, $extra_opts) || exists $server->{'restart_opts'}) { + delete $server->{'restart_opts'}; my $use_dynamic_option_switch= 0; if (!$use_dynamic_option_switch) {