diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 2d7c880bad7..623df02261a 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -458,6 +458,12 @@ sub collect_one_test_case($$$$$$$) { else { mtr_options_from_test_file($tinfo,"$testdir/${tname}.test"); + + if ( ! $tinfo->{'innodb_test'} ) + { + # mtr_report("Adding '--skip-innodb' to $tinfo->{'name'}"); + push(@{$tinfo->{'master_opt'}}, "--skip-innodb"); + } } # We can't restart a running server that may be in use @@ -500,13 +506,6 @@ sub mtr_options_from_test_file($$$) { } close FILE; - if ( ! $tinfo->{'innodb_test'} ) - { - # mtr_report("Adding '--skip-innodb' to $tinfo->{'name'}"); - push(@{$tinfo->{'master_opt'}}, "--skip-innodb"); - } - - } 1; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index c14e6d4d534..704baeeec94 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -876,6 +876,7 @@ sub command_line_setup () { start_timeout => 400, # enough time create innodb tables ndbcluster => 1, # ndbcluster not started + master_opt => [], }; $master->[1]= @@ -2140,6 +2141,14 @@ sub run_testcase ($) { { $do_restart= 1; } + # Check that running master was started with same options + # as the current test requires + elsif (! mtr_same_opts($master->[0]->{'master_opt'}, + $tinfo->{'master_opt'}) ) + { + $do_restart= 1; + } + if ( $do_restart ) { @@ -2219,6 +2228,8 @@ sub run_testcase ($) { report_failure_and_restart($tinfo); return; } + # Remember options used to start + $master->[0]->{'master_opt'}= $tinfo->{'master_opt'}; } if ( $using_ndbcluster_master and ! $master->[1]->{'pid'} ) {