Commit 20091c5b authored by unknown's avatar unknown
Browse files

Save "master_opt" in master so it can be checked later to see if it's the same...

Save "master_opt" in master so it can be checked later to see if it's the same as the test that are about to run uses the same.


mysql-test/lib/mtr_cases.pl:
  Move setting of --skip-innodb out of recursive loop
parent c295bd80
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -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;
+11 −0
Original line number Diff line number Diff line
@@ -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'} )
      {