From 0c3165feb34665abe09aaa30a39fcc50b52ae630 Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Thu, 24 Apr 2008 13:26:28 +0200 Subject: [PATCH 1/5] Add warning supressions for bug#31590 and bug#26402 that gort lost when moving the supressions from perl to SQL --- mysql-test/include/mtr_warnings.sql | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index e344b44b8f2..76c68cb68d0 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -201,6 +201,15 @@ INSERT INTO global_supressions VALUES ("Slave: Can't DROP 'c7'.* 1091"), ("Slave: Key column 'c6'.* 1072"), + /* Test case for Bug#31590 in order_by.test produces the following error */ + ("Out of sort memory; increase server sort buffer size"), + + /* Special case for Bug #26402 in show_check.test + - Question marks are not valid file name parts on Windows. Ignore + this error message. + */ + ("Can't find file: '.\\\\test\\\\\\?{8}.frm'"), + ("THE_LAST_SUPPRESSION")|| From 471a98001e9f7ab1b18ea90bab728ad501a5ab4e Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Thu, 24 Apr 2008 14:14:11 +0200 Subject: [PATCH 2/5] Add support for bootstrapping from init_db.sql, which is used in early versions of 5.1 and 5.0 Fix usage instruction of defaults_extra_file --- mysql-test/mysql-test-run.pl | 51 +++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index ba776a781b4..f4f45c5a61a 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2020,6 +2020,9 @@ sub sql_to_bootstrap { next; } + # Replace @HOSTNAME with localhost + $line=~ s/\'\@HOSTNAME\@\'/localhost/; + # Default, just add the line without newline # but with a space as separator $result.= "$line "; @@ -2071,24 +2074,40 @@ sub mysql_install_db { # ---------------------------------------------------------------------- my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql"; - # Use the mysql database for system tables - mtr_tofile($bootstrap_sql_file, "use mysql\n"); + if (-f "$path_sql_dir/mysql_system_tables.sql") + { + # Use the mysql database for system tables + mtr_tofile($bootstrap_sql_file, "use mysql\n"); - # Add the offical mysql system tables - # for a production system - mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables.sql", - $bootstrap_sql_file); + # Add the offical mysql system tables + # for a production system + mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables.sql", + $bootstrap_sql_file); - # Add the mysql system tables initial data - # for a production system - mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables_data.sql", - $bootstrap_sql_file); + # Add the mysql system tables initial data + # for a production system + mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables_data.sql", + $bootstrap_sql_file); - # Add test data for timezone - this is just a subset, on a real - # system these tables will be populated either by mysql_tzinfo_to_sql - # or by downloading the timezone table package from our website - mtr_appendfile_to_file("$path_sql_dir/mysql_test_data_timezone.sql", - $bootstrap_sql_file); + # Add test data for timezone - this is just a subset, on a real + # system these tables will be populated either by mysql_tzinfo_to_sql + # or by downloading the timezone table package from our website + mtr_appendfile_to_file("$path_sql_dir/mysql_test_data_timezone.sql", + $bootstrap_sql_file); + + } + else + { + # Install db from init_db.sql that exist in early 5.1 and 5.0 + # versions of MySQL + my $init_file= "$basedir/mysql-test/lib/init_db.sql"; + mtr_report(" - from '$init_file'"); + my $text= mtr_grab_file($init_file) or + mtr_error("Can't open '$init_file': $!"); + + mtr_tofile($bootstrap_sql_file, + sql_to_bootstrap($text)); + } # Fill help tables, just an empty file when running from bk repo # but will be replaced by a real fill_help_tables.sql when @@ -3741,7 +3760,7 @@ Options to control what engine/variation to run config|defaults-file= Use fixed config template for all tests - extra_defaults_file= Extra config template to add to + defaults_extra_file= Extra config template to add to all generated configs Options to control directories to use From 7e8898aaca0a75e6a8aa2f1ee80cc33157dbade8 Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Thu, 24 Apr 2008 14:15:15 +0200 Subject: [PATCH 3/5] Replace all - with - in $opt name --- mysql-test/lib/mtr_cases.pm | 2 +- mysql-test/lib/mtr_report.pm | 34 +++++++++++++++++++++++++--------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 0f8329f2f31..f46c0165e27 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -46,7 +46,7 @@ sub collect_option { my ($opt, $value)= @_; # Convert - to _ in option name - $opt =~ s/-/_/; + $opt =~ s/-/_/g; no strict 'refs'; ${$opt}= $value; } diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index a3c0f26c8fd..84c3c0dc226 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -26,8 +26,7 @@ our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line mtr_print_header mtr_report mtr_report_stats mtr_warning mtr_error mtr_debug mtr_verbose mtr_verbose_restart mtr_report_test_passed - mtr_report_test_failed mtr_report_test_skipped - mtr_report_stats); + mtr_report_test_failed mtr_report_test_skipped); use mtr_match; require "mtr_io.pl"; @@ -35,12 +34,13 @@ require "mtr_io.pl"; my $tot_real_time= 0; our $timestamp= 0; +our $timediff= 1; sub report_option { my ($opt, $value)= @_; # Convert - to _ in option name - $opt =~ s/-/_/; + $opt =~ s/-/_/g; no strict 'refs'; ${$opt}= $value; } @@ -228,20 +228,20 @@ sub mtr_report_stats ($) { # Print a list of check_testcases that failed(if any) if ( $::opt_check_testcases ) { - my @check_testcases= (); + my %check_testcases; foreach my $tinfo (@$tests) { if ( defined $tinfo->{'check_testcase_failed'} ) { - push(@check_testcases, $tinfo->{'name'}); + $check_testcases{$tinfo->{'name'}}= 1; } } - if ( @check_testcases ) + if ( keys %check_testcases ) { print "Check of testcase failed for: "; - print join(" ", @check_testcases); + print join(" ", keys %check_testcases); print "\n\n"; } } @@ -330,13 +330,29 @@ sub mtr_print_header () { use Time::localtime; +use Time::HiRes qw(gettimeofday); + +my $t0= gettimeofday(); + sub _timestamp { return "" unless $timestamp; + my $diff; + if ($timediff){ + my $t1= gettimeofday(); + my $elapsed= $t1 - $t0; + + $diff= sprintf(" +%02.3f", $elapsed); + + # Save current time for next lap + $t0= $t1; + + } + my $tm= localtime(); - return sprintf("%02d%02d%02d %2d:%02d:%02d ", + return sprintf("%02d%02d%02d %2d:%02d:%02d%s ", $tm->year % 100, $tm->mon+1, $tm->mday, - $tm->hour, $tm->min, $tm->sec); + $tm->hour, $tm->min, $tm->sec, $diff); } From c6aca99321ae5a20cd5003e0fdab769ec604c1b4 Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Thu, 24 Apr 2008 14:16:32 +0200 Subject: [PATCH 4/5] Allow 2002 as a valid error for connect fails. It's common on windows where we don't use Unix domin sockets for connection to server --- mysql-test/include/wait_until_connected_again.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/include/wait_until_connected_again.inc b/mysql-test/include/wait_until_connected_again.inc index a9cf741fcfe..c7bb774929a 100644 --- a/mysql-test/include/wait_until_connected_again.inc +++ b/mysql-test/include/wait_until_connected_again.inc @@ -10,7 +10,7 @@ while ($mysql_errno) # Strangely enough, the server might return "Too many connections" # while being shutdown, thus 1040 is an "allowed" error # See BUG#36228 - --error 0,1040,1053,2002,2006,2013 + --error 0,1040,1053,2002,2003,2006,2013 show status; dec $counter; From ffe4385b2ad49839441493440fe8ff961ea4b47b Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Fri, 25 Apr 2008 08:21:26 +0200 Subject: [PATCH 5/5] Add missing "include/have_ndb.inc" --- mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test index 1657a6902ba..e954c72fd1d 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test @@ -5,6 +5,7 @@ # to other engines (innodb, myisam), see also rpl_ndb_2other.test ############################################################## --source include/have_binlog_format_mixed_or_row.inc +--source include/have_ndb.inc --source include/ndb_master-slave.inc # On master use NDB as storage engine.