Loading mysql-test/lib/mtr_cases.pl +38 −23 Original line number Diff line number Diff line Loading @@ -37,6 +37,23 @@ sub collect_test_cases ($) { opendir(TESTDIR, $testdir) or mtr_error("Can't open dir \"$testdir\": $!"); # ---------------------------------------------------------------------- # Disable some tests listed in disabled.def # ---------------------------------------------------------------------- my %disabled; if ( open(DISABLED, "$testdir/disabled.def" ) ) { while ( <DISABLED> ) { chomp; if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) { $disabled{$1}= $2; } } close DISABLED; } if ( @::opt_cases ) { foreach my $tname ( @::opt_cases ) { # Run in specified order, no sort Loading Loading @@ -100,30 +117,13 @@ sub collect_test_cases ($) { } } collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,{}, collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled, $component_id); } closedir TESTDIR; } else { # ---------------------------------------------------------------------- # Disable some tests listed in disabled.def # ---------------------------------------------------------------------- my %disabled; if ( ! $::opt_ignore_disabled_def and open(DISABLED, "$testdir/disabled.def" ) ) { while ( <DISABLED> ) { chomp; if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) { $disabled{$1}= $2; } } close DISABLED; } foreach my $elem ( sort readdir(TESTDIR) ) { my $component_id= undef; my $tname= undef; Loading Loading @@ -414,18 +414,33 @@ sub collect_one_test_case($$$$$$$) { } # FIXME why this late? my $marked_as_disabled= 0; if ( $disabled->{$tname} ) { $tinfo->{'skip'}= 1; $tinfo->{'disable'}= 1; # Sub type of 'skip' $tinfo->{'comment'}= $disabled->{$tname} if $disabled->{$tname}; $marked_as_disabled= 1; $tinfo->{'comment'}= $disabled->{$tname}; } if ( -f $disabled_file ) { $marked_as_disabled= 1; $tinfo->{'comment'}= mtr_fromfile($disabled_file); } # If test was marked as disabled, either opt_enable_disabled is off and then # we skip this test, or it is on and then we run this test but warn if ( $marked_as_disabled ) { if ( $::opt_enable_disabled ) { $tinfo->{'dont_skip_though_disabled'}= 1; } else { $tinfo->{'skip'}= 1; $tinfo->{'disable'}= 1; # Sub type of 'skip' $tinfo->{'comment'}= mtr_fromfile($disabled_file); } } if ( $component_id eq 'im' ) Loading mysql-test/lib/mtr_report.pl +18 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ sub mtr_report_test_name($); sub mtr_report_test_passed($); sub mtr_report_test_failed($); sub mtr_report_test_skipped($); sub mtr_report_test_not_skipped_though_disabled($); sub mtr_show_failed_diff ($); sub mtr_report_stats ($); Loading Loading @@ -100,6 +101,23 @@ sub mtr_report_test_skipped ($) { } } sub mtr_report_tests_not_skipped_though_disabled ($) { my $tests= shift; if ( $::opt_enable_disabled ) { my @disabled_tests= grep {$_->{'dont_skip_though_disabled'}} @$tests; if ( @disabled_tests ) { print "\nTest(s) which will be run though they are marked as disabled:\n"; foreach my $tinfo ( sort {$a->{'name'} cmp $b->{'name'}} @disabled_tests ) { printf " %-20s : %s\n", $tinfo->{'name'}, $tinfo->{'comment'}; } } } } sub mtr_report_test_passed ($) { my $tinfo= shift; Loading mysql-test/mysql-test-run.pl +10 −2 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ our $opt_extern; our $opt_fast; our $opt_force; our $opt_reorder; our $opt_enable_disabled; our $opt_gcov; our $opt_gcov_err; Loading Loading @@ -660,6 +661,7 @@ sub command_line_setup () { 'netware' => \$opt_netware, 'old-master' => \$opt_old_master, 'reorder' => \$opt_reorder, 'enable-disabled' => \$opt_enable_disabled, 'script-debug' => \$opt_script_debug, 'sleep=i' => \$opt_sleep, 'socket=s' => \$opt_socket, Loading Loading @@ -1794,12 +1796,12 @@ sub run_suite () { mtr_print_thick_line(); mtr_report("Finding Tests in the '$suite' suite"); mtr_timer_start($glob_timers,"suite", 60 * $opt_suite_timeout); mtr_report("Starting Tests in the '$suite' suite"); mtr_report_tests_not_skipped_though_disabled($tests); mtr_print_header(); foreach my $tinfo ( @$tests ) Loading Loading @@ -3352,6 +3354,12 @@ sub run_mysqltest ($) { "--port=$master->[0]->{'path_myport'} " . "--socket=$master->[0]->{'path_mysock'}"; if ( $opt_debug ) { $cmdline_mysql_client_test .= " --debug=d:t:A,$opt_vardir_trace/log/mysql_client_test.trace"; } if ( $glob_use_embedded_server ) { $cmdline_mysql_client_test.= Loading mysql-test/r/rpl_row_create_table.result +1 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ CREATE TABLE t8 LIKE t4; CREATE TABLE t9 LIKE tt4; CREATE TEMPORARY TABLE tt5 LIKE t4; CREATE TEMPORARY TABLE tt6 LIKE tt4; CREATE TEMPORARY TABLE tt7 SELECT 1; **** On Master **** SHOW CREATE TABLE t8; Table t8 Loading mysql-test/r/rpl_switch_stm_row_mixed.result +29 −7 Original line number Diff line number Diff line Loading @@ -142,12 +142,24 @@ select foo3(); ERROR HY000: Cannot change the binary logging format inside a stored function or trigger select * from t1 where a="alarm"; a insert delayed into t2 values("delay_1_"); insert delayed into t2 values(concat("delay_2_",UUID())); Warnings: Warning 1265 Data truncated for column 'UUID()' at row 1 insert delayed into t2 values("delay_3_"),(concat("delay_4_",UUID())),("delay_5_"); Warnings: Warning 1265 Data truncated for column 'UUID()' at row 2 insert delayed into t2 values("delay_6_"); create table t12 (a int, b float); insert delayed into t12 values(1,rand()); set @a=2.345; insert delayed into t12 values(2,@a); select count(*) from t1; count(*) 36 select count(*) from t2; count(*) 1 7 select count(*) from t3; count(*) 2 Loading @@ -157,11 +169,12 @@ count(*) select count(*) from t5; count(*) 58 select count(*) from t12; count(*) 2 show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # drop database if exists mysqltest1 master-bin.000001 # Table_map 1 # table_id: # (mysql.proc) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # create database mysqltest1 master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) Loading @@ -178,10 +191,6 @@ master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work") master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string' Loading Loading @@ -269,4 +278,17 @@ master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `mysqltest1`; create table t12 (a int, b float) master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F drop database mysqltest1; Loading
mysql-test/lib/mtr_cases.pl +38 −23 Original line number Diff line number Diff line Loading @@ -37,6 +37,23 @@ sub collect_test_cases ($) { opendir(TESTDIR, $testdir) or mtr_error("Can't open dir \"$testdir\": $!"); # ---------------------------------------------------------------------- # Disable some tests listed in disabled.def # ---------------------------------------------------------------------- my %disabled; if ( open(DISABLED, "$testdir/disabled.def" ) ) { while ( <DISABLED> ) { chomp; if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) { $disabled{$1}= $2; } } close DISABLED; } if ( @::opt_cases ) { foreach my $tname ( @::opt_cases ) { # Run in specified order, no sort Loading Loading @@ -100,30 +117,13 @@ sub collect_test_cases ($) { } } collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,{}, collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled, $component_id); } closedir TESTDIR; } else { # ---------------------------------------------------------------------- # Disable some tests listed in disabled.def # ---------------------------------------------------------------------- my %disabled; if ( ! $::opt_ignore_disabled_def and open(DISABLED, "$testdir/disabled.def" ) ) { while ( <DISABLED> ) { chomp; if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) { $disabled{$1}= $2; } } close DISABLED; } foreach my $elem ( sort readdir(TESTDIR) ) { my $component_id= undef; my $tname= undef; Loading Loading @@ -414,18 +414,33 @@ sub collect_one_test_case($$$$$$$) { } # FIXME why this late? my $marked_as_disabled= 0; if ( $disabled->{$tname} ) { $tinfo->{'skip'}= 1; $tinfo->{'disable'}= 1; # Sub type of 'skip' $tinfo->{'comment'}= $disabled->{$tname} if $disabled->{$tname}; $marked_as_disabled= 1; $tinfo->{'comment'}= $disabled->{$tname}; } if ( -f $disabled_file ) { $marked_as_disabled= 1; $tinfo->{'comment'}= mtr_fromfile($disabled_file); } # If test was marked as disabled, either opt_enable_disabled is off and then # we skip this test, or it is on and then we run this test but warn if ( $marked_as_disabled ) { if ( $::opt_enable_disabled ) { $tinfo->{'dont_skip_though_disabled'}= 1; } else { $tinfo->{'skip'}= 1; $tinfo->{'disable'}= 1; # Sub type of 'skip' $tinfo->{'comment'}= mtr_fromfile($disabled_file); } } if ( $component_id eq 'im' ) Loading
mysql-test/lib/mtr_report.pl +18 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ sub mtr_report_test_name($); sub mtr_report_test_passed($); sub mtr_report_test_failed($); sub mtr_report_test_skipped($); sub mtr_report_test_not_skipped_though_disabled($); sub mtr_show_failed_diff ($); sub mtr_report_stats ($); Loading Loading @@ -100,6 +101,23 @@ sub mtr_report_test_skipped ($) { } } sub mtr_report_tests_not_skipped_though_disabled ($) { my $tests= shift; if ( $::opt_enable_disabled ) { my @disabled_tests= grep {$_->{'dont_skip_though_disabled'}} @$tests; if ( @disabled_tests ) { print "\nTest(s) which will be run though they are marked as disabled:\n"; foreach my $tinfo ( sort {$a->{'name'} cmp $b->{'name'}} @disabled_tests ) { printf " %-20s : %s\n", $tinfo->{'name'}, $tinfo->{'comment'}; } } } } sub mtr_report_test_passed ($) { my $tinfo= shift; Loading
mysql-test/mysql-test-run.pl +10 −2 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ our $opt_extern; our $opt_fast; our $opt_force; our $opt_reorder; our $opt_enable_disabled; our $opt_gcov; our $opt_gcov_err; Loading Loading @@ -660,6 +661,7 @@ sub command_line_setup () { 'netware' => \$opt_netware, 'old-master' => \$opt_old_master, 'reorder' => \$opt_reorder, 'enable-disabled' => \$opt_enable_disabled, 'script-debug' => \$opt_script_debug, 'sleep=i' => \$opt_sleep, 'socket=s' => \$opt_socket, Loading Loading @@ -1794,12 +1796,12 @@ sub run_suite () { mtr_print_thick_line(); mtr_report("Finding Tests in the '$suite' suite"); mtr_timer_start($glob_timers,"suite", 60 * $opt_suite_timeout); mtr_report("Starting Tests in the '$suite' suite"); mtr_report_tests_not_skipped_though_disabled($tests); mtr_print_header(); foreach my $tinfo ( @$tests ) Loading Loading @@ -3352,6 +3354,12 @@ sub run_mysqltest ($) { "--port=$master->[0]->{'path_myport'} " . "--socket=$master->[0]->{'path_mysock'}"; if ( $opt_debug ) { $cmdline_mysql_client_test .= " --debug=d:t:A,$opt_vardir_trace/log/mysql_client_test.trace"; } if ( $glob_use_embedded_server ) { $cmdline_mysql_client_test.= Loading
mysql-test/r/rpl_row_create_table.result +1 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ CREATE TABLE t8 LIKE t4; CREATE TABLE t9 LIKE tt4; CREATE TEMPORARY TABLE tt5 LIKE t4; CREATE TEMPORARY TABLE tt6 LIKE tt4; CREATE TEMPORARY TABLE tt7 SELECT 1; **** On Master **** SHOW CREATE TABLE t8; Table t8 Loading
mysql-test/r/rpl_switch_stm_row_mixed.result +29 −7 Original line number Diff line number Diff line Loading @@ -142,12 +142,24 @@ select foo3(); ERROR HY000: Cannot change the binary logging format inside a stored function or trigger select * from t1 where a="alarm"; a insert delayed into t2 values("delay_1_"); insert delayed into t2 values(concat("delay_2_",UUID())); Warnings: Warning 1265 Data truncated for column 'UUID()' at row 1 insert delayed into t2 values("delay_3_"),(concat("delay_4_",UUID())),("delay_5_"); Warnings: Warning 1265 Data truncated for column 'UUID()' at row 2 insert delayed into t2 values("delay_6_"); create table t12 (a int, b float); insert delayed into t12 values(1,rand()); set @a=2.345; insert delayed into t12 values(2,@a); select count(*) from t1; count(*) 36 select count(*) from t2; count(*) 1 7 select count(*) from t3; count(*) 2 Loading @@ -157,11 +169,12 @@ count(*) select count(*) from t5; count(*) 58 select count(*) from t12; count(*) 2 show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # drop database if exists mysqltest1 master-bin.000001 # Table_map 1 # table_id: # (mysql.proc) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # create database mysqltest1 master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) Loading @@ -178,10 +191,6 @@ master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work") master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string' Loading Loading @@ -269,4 +278,17 @@ master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `mysqltest1`; create table t12 (a int, b float) master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F drop database mysqltest1;