Loading mysql-test/lib/mtr_cases.pl +46 −47 Original line number Diff line number Diff line Loading @@ -433,41 +433,51 @@ sub optimize_cases { # Skip processing if already marked as skipped next if $tinfo->{skip}; # Replication test needs an adjustment of binlog format if (mtr_match_prefix($tinfo->{'name'}, "rpl")) { # ======================================================= # Get binlog-format used by this test from master_opt # If a special binlog format was selected with # --mysqld=--binlog-format=x, skip all test that does not # support it # ======================================================= my $test_binlog_format; foreach my $opt ( @{$tinfo->{master_opt}} ) { $test_binlog_format= $test_binlog_format || mtr_match_prefix($opt, "--binlog-format="); } # print $tinfo->{name}." uses ".$test_binlog_format."\n"; #print "used_binlog_format: $::used_binlog_format\n"; if (defined $::used_binlog_format ) { # ======================================================= # If a special binlog format was selected with # --mysqld=--binlog-format=x, skip all test with different # binlog-format # Fixed --binlog-format=x specified on command line # ======================================================= if (defined $::used_binlog_format and $test_binlog_format and $::used_binlog_format ne $test_binlog_format) if ( defined $tinfo->{'binlog_formats'} ) { #print "binlog_formats: ". join(", ", @{$tinfo->{binlog_formats}})."\n"; # The test supports different binlog formats # check if the selected one is ok my $supported= grep { $_ eq $::used_binlog_format } @{$tinfo->{'binlog_formats'}}; if ( !$supported ) { $tinfo->{'skip'}= 1; $tinfo->{'comment'}= "Requires --binlog-format='$test_binlog_format'"; next; $tinfo->{'comment'}= "Doesn't support --binlog-format='$::used_binlog_format'"; } } } else { # ======================================================= # Check that testcase supports the designated binlog-format # Use dynamic switching of binlog format # ======================================================= if ($test_binlog_format and defined $tinfo->{'sup_binlog_formats'} ) # Get binlog-format used by this test from master_opt my $test_binlog_format; foreach my $opt ( @{$tinfo->{master_opt}} ) { $test_binlog_format= mtr_match_prefix($opt, "--binlog-format=") || $test_binlog_format; } if (defined $test_binlog_format and defined $tinfo->{binlog_formats} ) { my $supported= grep { $_ eq $test_binlog_format } @{$tinfo->{'sup_binlog_formats'}}; grep { $_ eq $test_binlog_format } @{$tinfo->{'binlog_formats'}}; if ( !$supported ) { $tinfo->{'skip'}= 1; Loading @@ -476,20 +486,8 @@ sub optimize_cases { next; } } # ======================================================= # Use dynamic switching of binlog-format if mtr started # w/o --mysqld=--binlog-format=xxx and combinations. # ======================================================= if (!defined $tinfo->{'combination'} and !defined $::used_binlog_format) { $test_binlog_format= $tinfo->{'sup_binlog_formats'}->[0]; } # Save binlog format for dynamic switching $tinfo->{binlog_format}= $test_binlog_format; } } } Loading Loading @@ -879,18 +877,19 @@ sub collect_one_test_case($$$$$$$$$) { # the specified value in "tinfo" our @tags= ( ["include/have_innodb.inc", "innodb_test", 1], ["include/have_binlog_format_row.inc", "sup_binlog_formats", ["row"]], ["include/have_log_bin.inc", "need_binlog", 1], ["include/have_binlog_format_statement.inc", "sup_binlog_formats", ["statement"]], ["include/have_binlog_format_mixed.inc", "sup_binlog_formats", ["mixed"]], ["include/have_binlog_format_row.inc", "binlog_formats", ["row"]], ["include/have_binlog_format_statement.inc", "binlog_formats", ["statement"]], ["include/have_binlog_format_mixed.inc", "binlog_formats", ["mixed"]], ["include/have_binlog_format_mixed_or_row.inc", "sup_binlog_formats", ["mixed","row"]], "binlog_formats", ["mixed", "row"]], ["include/have_binlog_format_mixed_or_statement.inc", "sup_binlog_formats", ["mixed","statement"]], "binlog_formats", ["mixed", "statement"]], ["include/have_binlog_format_row_or_statement.inc", "sup_binlog_formats", ["row","statement"]], "binlog_formats", ["row", "statement"]], ["include/have_innodb.inc", "innodb_test", 1], ["include/have_log_bin.inc", "need_binlog", 1], ["include/big_test.inc", "big_test", 1], ["include/have_debug.inc", "need_debug", 1], ["include/have_ndb.inc", "ndb_test", 1], Loading mysql-test/mysql-test-run.pl +3 −12 Original line number Diff line number Diff line Loading @@ -4356,21 +4356,12 @@ sub run_testcase_need_master_restart($) # as the current test requires elsif (! mtr_same_opts($master->[0]->{'start_opts'}, $tinfo->{'master_opt'}) ) { # Chech that diff is binlog format only my $diff_opts= mtr_diff_opts($master->[0]->{'start_opts'},$tinfo->{'master_opt'}); if (scalar(@$diff_opts) eq 2) { $do_restart= 1 unless ($diff_opts->[0] =~/^--binlog-format=/ and $diff_opts->[1] =~/^--binlog-format=/); } else { $do_restart= 1; mtr_verbose("Restart master: running with different options '" . join(" ", @{$tinfo->{'master_opt'}}) . "' != '" . join(" ", @{$master->[0]->{'start_opts'}}) . "'" ); } } elsif( ! $master->[0]->{'pid'} ) { if ( $opt_extern ) Loading Loading
mysql-test/lib/mtr_cases.pl +46 −47 Original line number Diff line number Diff line Loading @@ -433,41 +433,51 @@ sub optimize_cases { # Skip processing if already marked as skipped next if $tinfo->{skip}; # Replication test needs an adjustment of binlog format if (mtr_match_prefix($tinfo->{'name'}, "rpl")) { # ======================================================= # Get binlog-format used by this test from master_opt # If a special binlog format was selected with # --mysqld=--binlog-format=x, skip all test that does not # support it # ======================================================= my $test_binlog_format; foreach my $opt ( @{$tinfo->{master_opt}} ) { $test_binlog_format= $test_binlog_format || mtr_match_prefix($opt, "--binlog-format="); } # print $tinfo->{name}." uses ".$test_binlog_format."\n"; #print "used_binlog_format: $::used_binlog_format\n"; if (defined $::used_binlog_format ) { # ======================================================= # If a special binlog format was selected with # --mysqld=--binlog-format=x, skip all test with different # binlog-format # Fixed --binlog-format=x specified on command line # ======================================================= if (defined $::used_binlog_format and $test_binlog_format and $::used_binlog_format ne $test_binlog_format) if ( defined $tinfo->{'binlog_formats'} ) { #print "binlog_formats: ". join(", ", @{$tinfo->{binlog_formats}})."\n"; # The test supports different binlog formats # check if the selected one is ok my $supported= grep { $_ eq $::used_binlog_format } @{$tinfo->{'binlog_formats'}}; if ( !$supported ) { $tinfo->{'skip'}= 1; $tinfo->{'comment'}= "Requires --binlog-format='$test_binlog_format'"; next; $tinfo->{'comment'}= "Doesn't support --binlog-format='$::used_binlog_format'"; } } } else { # ======================================================= # Check that testcase supports the designated binlog-format # Use dynamic switching of binlog format # ======================================================= if ($test_binlog_format and defined $tinfo->{'sup_binlog_formats'} ) # Get binlog-format used by this test from master_opt my $test_binlog_format; foreach my $opt ( @{$tinfo->{master_opt}} ) { $test_binlog_format= mtr_match_prefix($opt, "--binlog-format=") || $test_binlog_format; } if (defined $test_binlog_format and defined $tinfo->{binlog_formats} ) { my $supported= grep { $_ eq $test_binlog_format } @{$tinfo->{'sup_binlog_formats'}}; grep { $_ eq $test_binlog_format } @{$tinfo->{'binlog_formats'}}; if ( !$supported ) { $tinfo->{'skip'}= 1; Loading @@ -476,20 +486,8 @@ sub optimize_cases { next; } } # ======================================================= # Use dynamic switching of binlog-format if mtr started # w/o --mysqld=--binlog-format=xxx and combinations. # ======================================================= if (!defined $tinfo->{'combination'} and !defined $::used_binlog_format) { $test_binlog_format= $tinfo->{'sup_binlog_formats'}->[0]; } # Save binlog format for dynamic switching $tinfo->{binlog_format}= $test_binlog_format; } } } Loading Loading @@ -879,18 +877,19 @@ sub collect_one_test_case($$$$$$$$$) { # the specified value in "tinfo" our @tags= ( ["include/have_innodb.inc", "innodb_test", 1], ["include/have_binlog_format_row.inc", "sup_binlog_formats", ["row"]], ["include/have_log_bin.inc", "need_binlog", 1], ["include/have_binlog_format_statement.inc", "sup_binlog_formats", ["statement"]], ["include/have_binlog_format_mixed.inc", "sup_binlog_formats", ["mixed"]], ["include/have_binlog_format_row.inc", "binlog_formats", ["row"]], ["include/have_binlog_format_statement.inc", "binlog_formats", ["statement"]], ["include/have_binlog_format_mixed.inc", "binlog_formats", ["mixed"]], ["include/have_binlog_format_mixed_or_row.inc", "sup_binlog_formats", ["mixed","row"]], "binlog_formats", ["mixed", "row"]], ["include/have_binlog_format_mixed_or_statement.inc", "sup_binlog_formats", ["mixed","statement"]], "binlog_formats", ["mixed", "statement"]], ["include/have_binlog_format_row_or_statement.inc", "sup_binlog_formats", ["row","statement"]], "binlog_formats", ["row", "statement"]], ["include/have_innodb.inc", "innodb_test", 1], ["include/have_log_bin.inc", "need_binlog", 1], ["include/big_test.inc", "big_test", 1], ["include/have_debug.inc", "need_debug", 1], ["include/have_ndb.inc", "ndb_test", 1], Loading
mysql-test/mysql-test-run.pl +3 −12 Original line number Diff line number Diff line Loading @@ -4356,21 +4356,12 @@ sub run_testcase_need_master_restart($) # as the current test requires elsif (! mtr_same_opts($master->[0]->{'start_opts'}, $tinfo->{'master_opt'}) ) { # Chech that diff is binlog format only my $diff_opts= mtr_diff_opts($master->[0]->{'start_opts'},$tinfo->{'master_opt'}); if (scalar(@$diff_opts) eq 2) { $do_restart= 1 unless ($diff_opts->[0] =~/^--binlog-format=/ and $diff_opts->[1] =~/^--binlog-format=/); } else { $do_restart= 1; mtr_verbose("Restart master: running with different options '" . join(" ", @{$tinfo->{'master_opt'}}) . "' != '" . join(" ", @{$master->[0]->{'start_opts'}}) . "'" ); } } elsif( ! $master->[0]->{'pid'} ) { if ( $opt_extern ) Loading