summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-09-18 16:35:40 +0300
committerGeorgi Kodinov <joro@sun.com>2009-09-18 16:35:40 +0300
commit5d68d4a534000fe7fce1328b833cebd1f3b193cb (patch)
treea65b46eab2660f0760ae30202474403d94080381 /mysql-test
parent264c433d530165cf54a1d785feabb0c21b8ccf22 (diff)
parent924b4be597f405fbfa3e1856debdc2aee0152569 (diff)
downloadmariadb-git-5d68d4a534000fe7fce1328b833cebd1f3b193cb.tar.gz
automerge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/Makefile.am3
-rw-r--r--mysql-test/collections/README.experimental7
-rw-r--r--mysql-test/collections/default.experimental10
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test2
-rw-r--r--mysql-test/include/mtr_warnings.sql4
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm6
-rw-r--r--mysql-test/lib/My/Platform.pm9
-rw-r--r--mysql-test/lib/My/SafeProcess/Makefile.am3
-rwxr-xr-xmysql-test/lib/My/SafeProcess/safe_process_win.cc39
-rw-r--r--mysql-test/lib/mtr_cases.pm25
-rw-r--r--mysql-test/lib/mtr_report.pm4
-rw-r--r--mysql-test/lib/v1/incompatible.tests6
-rw-r--r--mysql-test/lib/v1/mtr_cases.pl25
-rwxr-xr-xmysql-test/mysql-test-run.pl89
-rw-r--r--mysql-test/r/almost_full.result1
-rw-r--r--mysql-test/r/bug46080.result2
-rw-r--r--mysql-test/r/insert_select.result1
-rw-r--r--mysql-test/r/lowercase_table3.result2
-rw-r--r--mysql-test/r/mysqltest.result19
-rw-r--r--mysql-test/r/partition_csv.result1
-rw-r--r--mysql-test/r/upgrade.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_file_format.result1
-rw-r--r--mysql-test/suite/innodb/t/innodb_file_format.test2
-rw-r--r--mysql-test/suite/parts/r/partition_recover_myisam.result2
-rw-r--r--mysql-test/suite/parts/t/partition_recover_myisam.test4
-rw-r--r--mysql-test/suite/rpl/r/rpl_bug33931.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_do_grant.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraCol_innodb.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraCol_myisam.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_idempotency.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_init_slave_errors.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result1
-rw-r--r--mysql-test/suite/rpl/t/disabled.def2
-rw-r--r--mysql-test/suite/rpl/t/rpl_bug33931.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_do_grant.test7
-rw-r--r--mysql-test/suite/rpl/t/rpl_idempotency.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_init_slave_errors.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test3
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result1
-rw-r--r--mysql-test/t/almost_full.test2
-rw-r--r--mysql-test/t/bug46080.test3
-rw-r--r--mysql-test/t/disabled.def2
-rw-r--r--mysql-test/t/events_logs_tests-master.opt2
-rw-r--r--mysql-test/t/insert_select.test1
-rw-r--r--mysql-test/t/log_tables-master.opt2
-rw-r--r--mysql-test/t/lowercase_table3.test2
-rw-r--r--mysql-test/t/mysqltest.test38
-rw-r--r--mysql-test/t/not_partition.test2
-rw-r--r--mysql-test/t/partition_csv.test2
-rw-r--r--mysql-test/t/ps-master.opt2
-rw-r--r--mysql-test/t/show_check-master.opt2
-rw-r--r--mysql-test/t/status-master.opt1
-rw-r--r--mysql-test/t/upgrade.test2
53 files changed, 265 insertions, 100 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index 810bead1adc..b1d0e85c70e 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -17,7 +17,8 @@
## Process this file with automake to create Makefile.in
-testdir = $(prefix)/mysql-test
+testroot = $(prefix)
+testdir = $(testroot)/mysql-test
test_SCRIPTS = mtr \
mysql-test-run \
diff --git a/mysql-test/collections/README.experimental b/mysql-test/collections/README.experimental
index 9eee2394423..2f5ee7b00ab 100644
--- a/mysql-test/collections/README.experimental
+++ b/mysql-test/collections/README.experimental
@@ -23,3 +23,10 @@ The syntax is as follows:
start with the same characters up to the last letter before the asterisk
are considered experimental:
main.a* # get rid of main.alias, main.alibaba and main.agliolio
+
+6) Optionally, the test case may be followed by one or more platform
+ qualifiers beginning with @ or @!. The test will then be considered
+ experimental only/except on that platform. Basic OS names as
+ reported by $^O in Perl, or 'windows' are supported, this includes
+ solaris, linux, windows, aix, darwin, ... Example:
+ main.alias @aix @windows # Fails on those
diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental
index 8bec38a373b..416bf7d9e67 100644
--- a/mysql-test/collections/default.experimental
+++ b/mysql-test/collections/default.experimental
@@ -1,6 +1,8 @@
funcs_1.charset_collation_1 # depends on compile-time decisions
-binlog.binlog_tmp_table # Bug#45578: Test binlog_tmp_table fails ramdonly on PB2: Unknown table 't2'
-main.ctype_gbk_binlog # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
-rpl.rpl_row_create_table # Bug#45576: rpl_row_create_table fails on PB2
+main.plugin_load @solaris # Bug#42144
+binlog.binlog_tmp_table* # Bug#45578: Test binlog_tmp_table fails ramdonly on PB2: Unknown table 't2'
+main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
+rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2
rpl_ndb.rpl_ndb_log # Bug#38998
-rpl.rpl_innodb_bug28430 # Bug#46029
+rpl.rpl_innodb_bug28430* @solaris # Bug#46029
+rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31
diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
index 6890913b7d1..a7b02065144 100644
--- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
+++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
@@ -22,6 +22,8 @@ DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t1
# should stop the slave. #
#################################################
+call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
+
--echo **** Diff Table Def Start ****
##############################################
diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql
index b99402c8031..2156c37f3e3 100644
--- a/mysql-test/include/mtr_warnings.sql
+++ b/mysql-test/include/mtr_warnings.sql
@@ -132,7 +132,7 @@ INSERT INTO global_suppressions VALUES
("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49"),
- ("Statement is not safe to log in statement format"),
+ ("Statement may not be safe to log in statement format"),
/* test case for Bug#bug29807 copies a stray frm into database */
("InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal"),
@@ -162,6 +162,8 @@ INSERT INTO global_suppressions VALUES
("Slave: Unknown column 'c7' in 't15' Error_code: 1054"),
("Slave: Can't DROP 'c7'.* 1091"),
("Slave: Key column 'c6'.* 1072"),
+ ("Slave I/O: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."),
+ (".SELECT UNIX_TIMESTAMP... failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"),
/* Test case for Bug#31590 in order_by.test produces the following error */
("Out of sort memory; increase server sort buffer size"),
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index 852f706c858..c1e8f7cd826 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -204,8 +204,10 @@ my @mysqld_rules=
{ 'port' => \&fix_port },
{ 'socket' => \&fix_socket },
{ '#log-error' => \&fix_log_error },
- { 'log' => \&fix_log },
- { 'log-slow-queries' => \&fix_log_slow_queries },
+ { 'general_log' => 1 },
+ { 'general_log_file' => \&fix_log },
+ { 'slow_query_log' => 1 },
+ { 'slow_query_log_file' => \&fix_log_slow_queries },
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } },
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } },
{ 'server-id' => \&fix_server_id, },
diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm
index 69ffdfbb4ce..371120ab644 100644
--- a/mysql-test/lib/My/Platform.pm
+++ b/mysql-test/lib/My/Platform.pm
@@ -106,10 +106,13 @@ sub check_socket_path_length {
my ($path)= @_;
return 0 if IS_WINDOWS;
+ # This may not be true, but we can't test for it on AIX due to Perl bug
+ # See Bug #45771
+ return 0 if ($^O eq 'aix');
require IO::Socket::UNIX;
- my $truncated= 1; # Be negative
+ my $truncated= undef;
# Create a tempfile name with same length as "path"
my $tmpdir = tempdir( CLEANUP => 0);
@@ -122,6 +125,7 @@ sub check_socket_path_length {
Local => $testfile,
Listen => 1,
);
+ $truncated= 1; # Be negatvie
die "Could not create UNIX domain socket: $!"
unless defined $sock;
@@ -133,6 +137,9 @@ sub check_socket_path_length {
};
+ die "Unexpected failure when checking socket path length: $@"
+ if $@ and not defined $truncated;
+
$sock= undef; # Close socket
rmtree($tmpdir); # Remove the tempdir and any socket file created
return $truncated;
diff --git a/mysql-test/lib/My/SafeProcess/Makefile.am b/mysql-test/lib/My/SafeProcess/Makefile.am
index 623c0e9a87a..722331453fe 100644
--- a/mysql-test/lib/My/SafeProcess/Makefile.am
+++ b/mysql-test/lib/My/SafeProcess/Makefile.am
@@ -13,7 +13,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-safedir = $(prefix)/mysql-test/lib/My/SafeProcess
+testroot = $(prefix)
+safedir = $(testroot)/mysql-test/lib/My/SafeProcess
#nobase_bin_PROGRAMS = ...
safe_PROGRAMS = my_safe_process
diff --git a/mysql-test/lib/My/SafeProcess/safe_process_win.cc b/mysql-test/lib/My/SafeProcess/safe_process_win.cc
index 80c1b7a97f2..455262b29f5 100755
--- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc
@@ -163,6 +163,7 @@ int main(int argc, const char** argv )
HANDLE job_handle;
HANDLE wait_handles[NUM_HANDLES]= {0};
PROCESS_INFORMATION process_info= {0};
+ BOOL nocore= FALSE;
sprintf(safe_process_name, "safe_process[%d]", pid);
@@ -188,22 +189,33 @@ int main(int argc, const char** argv )
die("No real args -> nothing to do");
/* Copy the remaining args to child_arg */
for (int j= i+1; j < argc; j++) {
- to+= _snprintf(to, child_args + sizeof(child_args) - to, "%s ", argv[j]);
+ if (strchr (argv[j], ' ')) {
+ /* Protect with "" if this arg contains a space */
+ to+= _snprintf(to, child_args + sizeof(child_args) - to,
+ "\"%s\" ", argv[j]);
+ } else {
+ to+= _snprintf(to, child_args + sizeof(child_args) - to,
+ "%s ", argv[j]);
+ }
}
break;
} else {
- if ( strcmp(arg, "--verbose") == 0 )
+ if (strcmp(arg, "--verbose") == 0)
verbose++;
- else if ( strncmp(arg, "--parent-pid", 10) == 0 )
- {
- /* Override parent_pid with a value provided by user */
- const char* start;
+ else if (strncmp(arg, "--parent-pid", 10) == 0)
+ {
+ /* Override parent_pid with a value provided by user */
+ const char* start;
if ((start= strstr(arg, "=")) == NULL)
- die("Could not find start of option value in '%s'", arg);
- start++; /* Step past = */
- if ((parent_pid= atoi(start)) == 0)
- die("Invalid value '%s' passed to --parent-id", start);
- }
+ die("Could not find start of option value in '%s'", arg);
+ start++; /* Step past = */
+ if ((parent_pid= atoi(start)) == 0)
+ die("Invalid value '%s' passed to --parent-id", start);
+ }
+ else if (strcmp(arg, "--nocore") == 0)
+ {
+ nocore= TRUE;
+ }
else
die("Unknown option: %s", arg);
}
@@ -241,6 +253,11 @@ int main(int argc, const char** argv )
&jeli, sizeof(jeli)) == 0)
message("SetInformationJobObject failed, continue anyway...");
+ /* Avoid popup box */
+ if (nocore)
+ SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX
+ | SEM_NOOPENFILEERRORBOX);
+
#if 0
/* Setup stdin, stdout and stderr redirect */
si.dwFlags= STARTF_USESTDHANDLES;
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index efd9980eb7a..dff005105f6 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -41,6 +41,7 @@ our $opt_with_ndbcluster_only;
our $defaults_file;
our $defaults_extra_file;
our $reorder= 1;
+our $quick_collect;
sub collect_option {
my ($opt, $value)= @_;
@@ -68,6 +69,9 @@ require "mtr_misc.pl";
my $do_test_reg;
my $skip_test_reg;
+# If "Quick collect", set to 1 once a test to run has been found.
+my $some_test_found;
+
sub init_pattern {
my ($from, $what)= @_;
return undef unless defined $from;
@@ -102,6 +106,7 @@ sub collect_test_cases ($$) {
foreach my $suite (split(",", $suites))
{
push(@$cases, collect_one_suite($suite, $opt_cases));
+ last if $some_test_found;
}
if ( @$opt_cases )
@@ -139,7 +144,7 @@ sub collect_test_cases ($$) {
}
}
- if ( $reorder )
+ if ( $reorder && !$quick_collect)
{
# Reorder the test cases in an order that will make them faster to run
my %sort_criteria;
@@ -386,7 +391,7 @@ sub collect_one_suite($)
# Read combinations for this suite and build testcases x combinations
# if any combinations exists
# ----------------------------------------------------------------------
- if ( ! $skip_combinations )
+ if ( ! $skip_combinations && ! $quick_collect )
{
my @combinations;
my $combination_file= "$suitedir/combinations";
@@ -645,6 +650,12 @@ sub optimize_cases {
if ( $default_engine =~ /^innodb/i );
}
}
+
+ if ($quick_collect && ! $tinfo->{'skip'})
+ {
+ $some_test_found= 1;
+ return;
+ }
}
}
@@ -909,14 +920,14 @@ sub collect_one_test_case {
if ( $tinfo->{'big_test'} and ! $::opt_big_test )
{
$tinfo->{'skip'}= 1;
- $tinfo->{'comment'}= "Test need 'big-test' option";
+ $tinfo->{'comment'}= "Test needs 'big-test' option";
return $tinfo
}
if ( $tinfo->{'need_debug'} && ! $::debug_compiled_binaries )
{
$tinfo->{'skip'}= 1;
- $tinfo->{'comment'}= "Test need debug binaries";
+ $tinfo->{'comment'}= "Test needs debug binaries";
return $tinfo
}
@@ -952,14 +963,14 @@ sub collect_one_test_case {
if ($tinfo->{'federated_test'})
{
- # This is a test that need federated, enable it
+ # This is a test that needs federated, enable it
push(@{$tinfo->{'master_opt'}}, "--loose-federated");
push(@{$tinfo->{'slave_opt'}}, "--loose-federated");
}
if ( $tinfo->{'innodb_test'} )
{
- # This is a test that need innodb
+ # This is a test that needs innodb
if ( $::mysqld_variables{'innodb'} eq "OFF" ||
! exists $::mysqld_variables{'innodb'} )
{
@@ -980,7 +991,7 @@ sub collect_one_test_case {
if (grep(/^--skip-log-bin/, @::opt_extra_mysqld_opt) )
{
$tinfo->{'skip'}= 1;
- $tinfo->{'comment'}= "Test need binlog";
+ $tinfo->{'comment'}= "Test needs binlog";
return $tinfo;
}
}
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm
index a246c5bbef6..f2131b9bd76 100644
--- a/mysql-test/lib/mtr_report.pm
+++ b/mysql-test/lib/mtr_report.pm
@@ -134,8 +134,8 @@ sub mtr_report_test ($) {
# an asterisk at the end, determine if the characters up to
# but excluding the asterisk are the same
if ( $exp ne "" && substr($exp, -1, 1) eq "*" ) {
- $exp = substr($exp, 0, length($exp) - 1);
- if ( substr($test_name, 0, length($exp)) ne $exp ) {
+ my $nexp = substr($exp, 0, length($exp) - 1);
+ if ( substr($test_name, 0, length($nexp)) ne $nexp ) {
# no match, try next entry
next;
}
diff --git a/mysql-test/lib/v1/incompatible.tests b/mysql-test/lib/v1/incompatible.tests
new file mode 100644
index 00000000000..fefdad9ce4c
--- /dev/null
+++ b/mysql-test/lib/v1/incompatible.tests
@@ -0,0 +1,6 @@
+# This file lists tests that cannot run in MTR v1 for some reason.
+# They will be skipped.
+# Any text following white space after full test name is ignored
+# Only exact test names can be used, no regexp.
+
+main.fulltext_plugin # Refers to $SIMPLE_PARSER_OPT which is not set
diff --git a/mysql-test/lib/v1/mtr_cases.pl b/mysql-test/lib/v1/mtr_cases.pl
index 4d7b1f4ec70..288e8c22b44 100644
--- a/mysql-test/lib/v1/mtr_cases.pl
+++ b/mysql-test/lib/v1/mtr_cases.pl
@@ -32,6 +32,7 @@ sub mtr_options_from_test_file($$);
my $do_test;
my $skip_test;
+my %incompatible;
sub init_pattern {
my ($from, $what)= @_;
@@ -47,6 +48,15 @@ sub init_pattern {
}
+sub collect_incomp_tests {
+ open (INCOMP, "lib/v1/incompatible.tests");
+ while (<INCOMP>)
+ {
+ next unless /^\w/;
+ s/\s.*\n//; # Ignore anything from first white space
+ $incompatible{$_}= 1;
+ }
+}
##############################################################################
#
@@ -58,6 +68,8 @@ sub collect_test_cases ($) {
$do_test= init_pattern($::opt_do_test, "--do-test");
$skip_test= init_pattern($::opt_skip_test, "--skip-test");
+ collect_incomp_tests();
+
my $suites= shift; # Semicolon separated list of test suites
my $cases = []; # Array of hash
@@ -528,6 +540,17 @@ sub collect_one_test_case($$$$$$$$$) {
$tinfo->{'component_id'} = $component_id;
push(@$cases, $tinfo);
+ # Remove "combinations" part of test name
+ my $test_base_name= $tinfo->{'name'};
+ $test_base_name=~ s/\s.*\n//;
+
+ if (exists ($incompatible{$test_base_name}))
+ {
+ $tinfo->{'skip'}= 1;
+ $tinfo->{'comment'}= "Test cannot run in mtr v1";
+ return;
+ }
+
# ----------------------------------------------------------------------
# Skip some tests but include in list, just mark them to skip
# ----------------------------------------------------------------------
@@ -841,7 +864,7 @@ sub collect_one_test_case($$$$$$$$$) {
if ( $tinfo->{'innodb_test'} )
{
# This is a test that need innodb
- if ( $::mysqld_variables{'innodb'} ne "TRUE" )
+ if ( $::mysqld_variables{'innodb'} eq "OFF" )
{
# innodb is not supported, skip it
$tinfo->{'skip'}= 1;
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 9e168463e99..114b6c84aa3 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -209,6 +209,7 @@ sub check_timeout { return $opt_testcase_timeout * 6; };
my $opt_start;
my $opt_start_dirty;
+my $start_only;
my $opt_wait_all;
my $opt_repeat= 1;
my $opt_retry= 3;
@@ -984,6 +985,9 @@ sub command_line_setup {
if ( $opt_experimental )
{
+ # $^O on Windows considered not generic enough
+ my $plat= (IS_WINDOWS) ? 'windows' : $^O;
+
# read the list of experimental test cases from the file specified on
# the command line
open(FILE, "<", $opt_experimental) or mtr_error("Can't read experimental file: $opt_experimental");
@@ -994,6 +998,15 @@ sub command_line_setup {
# remove comments (# foo) at the beginning of the line, or after a
# blank at the end of the line
s/( +|^)#.*$//;
+ # If @ platform specifier given, use this entry only if it contains
+ # @<platform> or @!<xxx> where xxx != platform
+ if (/\@.*/)
+ {
+ next if (/\@!$plat/);
+ next unless (/\@$plat/ or /\@!/);
+ # Then remove @ and everything after it
+ s/\@.*$//;
+ }
# remove whitespace
s/^ +//;
s/ +$//;
@@ -1241,13 +1254,28 @@ sub command_line_setup {
{
mtr_error("Can't use --extern when using debugger");
}
+ # Set one week timeout (check-testcase timeout will be 1/10th)
+ $opt_testcase_timeout= 7 * 24 * 60;
+ $opt_suite_timeout= 7 * 24 * 60;
+ # One day to shutdown
+ $opt_shutdown_timeout= 24 * 60;
+ # One day for PID file creation (this is given in seconds not minutes)
+ $opt_start_timeout= 24 * 60 * 60;
+ }
+
+ # --------------------------------------------------------------------------
+ # Modified behavior with --start options
+ # --------------------------------------------------------------------------
+ if ($opt_start or $opt_start_dirty) {
+ collect_option ('quick-collect', 1);
+ $start_only= 1;
}
# --------------------------------------------------------------------------
# Check use of wait-all
# --------------------------------------------------------------------------
- if ($opt_wait_all && ! ($opt_start_dirty || $opt_start))
+ if ($opt_wait_all && ! $start_only)
{
mtr_error("--wait-all can only be used with --start or --start-dirty");
}
@@ -1506,6 +1534,10 @@ sub collect_mysqld_features_from_running_server ()
}
}
+ # "Convert" innodb flag
+ $mysqld_variables{'innodb'}= "ON"
+ if ($mysqld_variables{'have_innodb'} eq "YES");
+
# Parse version
my $version_str= $mysqld_variables{'version'};
if ( $version_str =~ /^([0-9]*)\.([0-9]*)\.([0-9]*)/ )
@@ -1764,7 +1796,7 @@ sub environment_setup {
my $plugin_filename;
if (IS_WINDOWS)
{
- $plugin_filename = "ha_example.dll";
+ $plugin_filename = "ha_example.dll";
}
else
{
@@ -1772,7 +1804,8 @@ sub environment_setup {
}
my $lib_example_plugin=
mtr_file_exists(vs_config_dirs('storage/example',$plugin_filename),
- "$basedir/storage/example/.libs/".$plugin_filename);
+ "$basedir/storage/example/.libs/".$plugin_filename,
+ "$basedir/lib/mysql/plugin/".$plugin_filename);
$ENV{'EXAMPLE_PLUGIN'}=
($lib_example_plugin ? basename($lib_example_plugin) : "");
$ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=".
@@ -2811,7 +2844,7 @@ sub run_testcase_check_skip_test($)
if ( $tinfo->{'skip'} )
{
- mtr_report_test_skipped($tinfo);
+ mtr_report_test_skipped($tinfo) unless $start_only;
return 1;
}
@@ -3298,9 +3331,16 @@ sub run_testcase ($) {
# server exits
# ----------------------------------------------------------------------
- if ( $opt_start or $opt_start_dirty )
+ if ( $start_only )
{
mtr_print("\nStarted", started(all_servers()));
+ mtr_print("Using config for test", $tinfo->{name});
+ mtr_print("Port and socket path for server(s):");
+ foreach my $mysqld ( mysqlds() )
+ {
+ mtr_print ($mysqld->name() . " " . $mysqld->value('port') .
+ " " . $mysqld->value('socket'));
+ }
mtr_print("Waiting for server(s) to exit...");
if ( $opt_wait_all ) {
My::SafeProcess->wait_all();
@@ -3542,8 +3582,8 @@ sub run_testcase ($) {
# error log and write all lines that look
# suspicious into $error_log.warnings
#
-sub extract_warning_lines ($) {
- my ($error_log) = @_;
+sub extract_warning_lines ($$) {
+ my ($error_log, $tname) = @_;
# Open the servers .err log file and read all lines
# belonging to current tets into @lines
@@ -3551,14 +3591,27 @@ sub extract_warning_lines ($) {
or mtr_error("Could not open file '$error_log' for reading: $!");
my @lines;
+ my $found_test= 0; # Set once we've found the log of this test
while ( my $line = <$Ferr> )
{
- if ( $line =~ /^CURRENT_TEST:/ )
+ if ($found_test)
+ {
+ # If test wasn't last after all, discard what we found, test again.
+ if ( $line =~ /^CURRENT_TEST:/)
+ {
+ @lines= ();
+ $found_test= $line =~ /^CURRENT_TEST: $tname/;
+ }
+ else
+ {
+ push(@lines, $line);
+ }
+ }
+ else
{
- # Throw away lines from previous tests
- @lines = ();
+ # Search for beginning of test, until found
+ $found_test= 1 if ($line =~ /^CURRENT_TEST: $tname/);
}
- push(@lines, $line);
}
$Ferr = undef; # Close error log file
@@ -3595,10 +3648,8 @@ sub extract_warning_lines ($) {
# and correcting them shows a few additional harmless warnings.
# Thus those patterns are temporarily removed from the list
# of patterns. For more info see BUG#42408
- # qr/^Warning:|mysqld: Warning|\[Warning\]/,
- # qr/^Error:|\[ERROR\]/,
- qr/^Warning:|mysqld: Warning/,
- qr/^Error:/,
+ qr/^Warning:|mysqld: Warning|\[Warning\]/,
+ qr/^Error:|\[ERROR\]/,
qr/^==.* at 0x/,
qr/InnoDB: Warning|InnoDB: Error/,
qr/^safe_mutex:|allocated at line/,
@@ -3638,7 +3689,7 @@ sub start_check_warnings ($$) {
my $log_error= $mysqld->value('#log-error');
# To be communicated to the test
$ENV{MTR_LOG_ERROR}= $log_error;
- extract_warning_lines($log_error);
+ extract_warning_lines($log_error, $tinfo->{name});
my $args;
mtr_init_args(\$args);
@@ -4078,8 +4129,8 @@ sub mysqld_arguments ($$$) {
if ( $mysql_version_id >= 50106 )
{
- # Turn on logging to both tables and file
- mtr_add_arg($args, "--log-output=table,file");
+ # Turn on logging to file
+ mtr_add_arg($args, "--log-output=file");
}
# Check if "extra_opt" contains skip-log-bin
@@ -5123,7 +5174,7 @@ Options to control what test suites or cases to run
skip-rpl Skip the replication test cases.
big-test Also run tests marked as "big"
enable-disabled Run also tests marked as disabled
- print_testcases Don't run the tests but print details about all the
+ print-testcases Don't run the tests but print details about all the
selected tests, in the order they would be run.
Options that specify ports
diff --git a/mysql-test/r/almost_full.result b/mysql-test/r/almost_full.result
index eb28f12fa51..b2d7092aa51 100644
--- a/mysql-test/r/almost_full.result
+++ b/mysql-test/r/almost_full.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("The table 't1' is full");
drop table if exists t1;
set global myisam_data_pointer_size=2;
CREATE TABLE t1 (a int auto_increment primary key not null, b longtext) ENGINE=MyISAM;
diff --git a/mysql-test/r/bug46080.result b/mysql-test/r/bug46080.result
index 18c7c22829a..2173768cdad 100644
--- a/mysql-test/r/bug46080.result
+++ b/mysql-test/r/bug46080.result
@@ -2,6 +2,8 @@
# Bug #46080: group_concat(... order by) crashes server when
# sort_buffer_size cannot allocate
#
+call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'");
+call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k");
CREATE TABLE t1(a CHAR(255));
INSERT INTO t1 VALUES ('a');
SET @@SESSION.sort_buffer_size=5*16*1000000;
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index 1af66c41205..f12c9a0a61a 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -841,6 +841,7 @@ SET max_heap_table_size = 16384;
SET @old_myisam_data_pointer_size = @@myisam_data_pointer_size;
SET GLOBAL myisam_data_pointer_size = 2;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+call mtr.add_suppression("mysqld: The table '.*#sql.*' is full");
INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
Got one of the listed errors
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
diff --git a/mysql-test/r/lowercase_table3.result b/mysql-test/r/lowercase_table3.result
index 1ef7d04bb1d..22e80aaeb26 100644
--- a/mysql-test/r/lowercase_table3.result
+++ b/mysql-test/r/lowercase_table3.result
@@ -1,4 +1,4 @@
-call mtr.add_suppression("Cannot find or open table test/BUG29839 from .*");
+call mtr.add_suppression("Cannot find or open table test/BUG29839 from");
DROP TABLE IF EXISTS t1,T1;
CREATE TABLE t1 (a INT);
SELECT * FROM T1;
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index 52a1734ea54..f68413264e4 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -314,21 +314,10 @@ here is the sourced script
1 = outer loop variable before dec
0 = outer loop variable after dec
-
-2 = outer loop variable after while
+outer=2 ifval=0
+outer=1 ifval=1
here is the sourced script
-2 = outer loop variable before dec
-
-1 = outer loop variable after dec
-
-1 = outer loop variable after while
-here is the sourced script
-
-1 = outer loop variable before dec
-
-0 = outer loop variable after dec
-
In loop
here is the sourced script
@@ -538,6 +527,10 @@ mysqltest: At line 1: Missing required argument 'filename' to command 'write_fil
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
Content for test_file1
mysqltest: At line 1: File already exist: 'MYSQLTEST_VARDIR/tmp/test_file1.tmp'
+These lines should be repeated,
+if things work as expected
+These lines should be repeated,
+if things work as expected
Some data
for cat_file command
of mysqltest
diff --git a/mysql-test/r/partition_csv.result b/mysql-test/r/partition_csv.result
index 07651f29da4..18e28d4670a 100644
--- a/mysql-test/r/partition_csv.result
+++ b/mysql-test/r/partition_csv.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("Failed to write to mysql.general_log");
drop table if exists t1;
create table t1 (a int)
engine = csv
diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result
index da6201692a9..034242079b1 100644
--- a/mysql-test/r/upgrade.result
+++ b/mysql-test/r/upgrade.result
@@ -108,11 +108,7 @@ a-b-c
show create view `a-b-c`.v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `a`.`f1` AS `f1` from (`a-b-c`.`t1` `a` join `information_schema`.`tables` `b`) where (convert(`a`.`f1` using utf8) = `b`.`TABLE_NAME`) utf8 utf8_general_ci
-Warnings:
-Note 1600 Creation context of view `a-b-c`.`v1' is invalid
select * from `a-b-c`.v1;
f1
-Warnings:
-Note 1600 Creation context of view `a-b-c`.`v1' is invalid
drop database `a-b-c`;
use test;
diff --git a/mysql-test/suite/innodb/r/innodb_file_format.result b/mysql-test/suite/innodb/r/innodb_file_format.result
index 9cfac5f001c..fbc67ada1bb 100644
--- a/mysql-test/suite/innodb/r/innodb_file_format.result
+++ b/mysql-test/suite/innodb/r/innodb_file_format.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
select @@innodb_file_format;
@@innodb_file_format
Antelope
diff --git a/mysql-test/suite/innodb/t/innodb_file_format.test b/mysql-test/suite/innodb/t/innodb_file_format.test
index 293e87a413e..4823254b959 100644
--- a/mysql-test/suite/innodb/t/innodb_file_format.test
+++ b/mysql-test/suite/innodb/t/innodb_file_format.test
@@ -1,6 +1,8 @@
-- source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.inc
+call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
+
let $format=`select @@innodb_file_format`;
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
diff --git a/mysql-test/suite/parts/r/partition_recover_myisam.result b/mysql-test/suite/parts/r/partition_recover_myisam.result
index df737ec2853..49775ee498e 100644
--- a/mysql-test/suite/parts/r/partition_recover_myisam.result
+++ b/mysql-test/suite/parts/r/partition_recover_myisam.result
@@ -1,3 +1,5 @@
+call mtr.add_suppression("./test/t1_will_crash");
+call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc");
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
FLUSH TABLES;
diff --git a/mysql-test/suite/parts/t/partition_recover_myisam.test b/mysql-test/suite/parts/t/partition_recover_myisam.test
index 14604bfeb15..64bc821ac37 100644
--- a/mysql-test/suite/parts/t/partition_recover_myisam.test
+++ b/mysql-test/suite/parts/t/partition_recover_myisam.test
@@ -1,4 +1,8 @@
# test the auto-recover (--myisam-recover) of partitioned myisam tables
+
+call mtr.add_suppression("./test/t1_will_crash");
+call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc");
+
--source include/have_partition.inc
--disable_warnings
--disable_query_log
diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result
index 85c8fb0da9c..a17941f6ba9 100644
--- a/mysql-test/suite/rpl/r/rpl_bug33931.result
+++ b/mysql-test/suite/rpl/r/rpl_bug33931.result
@@ -1,5 +1,5 @@
reset master;
-call mtr.add_suppression("Failed during slave thread initialization");
+call mtr.add_suppression("Failed during slave I/O thread initialization");
stop slave;
reset slave;
SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result
index 69bcfad4347..0913b1afdbf 100644
--- a/mysql-test/suite/rpl/r/rpl_do_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_do_grant.result
@@ -166,4 +166,7 @@ DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db;
DROP USER 'create_rout_db'@'localhost';
+call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
+USE mtr;
+call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
"End of test"
diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
index e57daad3342..e2ec78e7adc 100644
--- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
**** Diff Table Def Start ****
*** On Slave ***
STOP SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
index 6696ddc7789..ed5b4eac27d 100644
--- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
**** Diff Table Def Start ****
*** On Slave ***
STOP SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result
index 3341c03db0f..bfdcbc6fa23 100644
--- a/mysql-test/suite/rpl/r/rpl_idempotency.result
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result
@@ -4,7 +4,8 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032");
+call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
+call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
SET @old_slave_exec_mode= @@global.slave_exec_mode;
CREATE TABLE t1 (a INT PRIMARY KEY);
diff --git a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result
index ab957e6d9bc..c6ee82b13f3 100644
--- a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result
+++ b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result
@@ -9,6 +9,7 @@ reset slave;
SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
start slave;
Reporting the following error: Failed during slave thread initialization
+call mtr.add_suppression("Failed during slave I/O thread initialization");
SET GLOBAL debug= "";
stop slave;
reset slave;
diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
index 777f7d8427b..e2efcf08d7a 100644
--- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
+++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
@@ -51,3 +51,4 @@ Last_SQL_Errno 9
Last_SQL_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed
drop table t1;
drop table t1;
+call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3");
diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def
index af8eef764ed..38fc9e21322 100644
--- a/mysql-test/suite/rpl/t/disabled.def
+++ b/mysql-test/suite/rpl/t/disabled.def
@@ -11,5 +11,3 @@
##############################################################################
rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx
-rpl_init_slave : Bug#44920 2009-07006 pcrews MTR2 is not processing master.opt input properly on Windows. *Must be done this way due to the nature of the bug*
-
diff --git a/mysql-test/suite/rpl/t/rpl_bug33931.test b/mysql-test/suite/rpl/t/rpl_bug33931.test
index 13f781c644b..1316ddb7401 100644
--- a/mysql-test/suite/rpl/t/rpl_bug33931.test
+++ b/mysql-test/suite/rpl/t/rpl_bug33931.test
@@ -15,7 +15,7 @@ reset master;
connection slave;
# Add suppression for expected warnings in slaves error log
-call mtr.add_suppression("Failed during slave thread initialization");
+call mtr.add_suppression("Failed during slave I/O thread initialization");
--disable_warnings
stop slave;
diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test
index fc793c03649..a13adf28b95 100644
--- a/mysql-test/suite/rpl/t/rpl_do_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_do_grant.test
@@ -210,5 +210,10 @@ DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db;
DROP USER 'create_rout_db'@'localhost';
-
+
+call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
+connection slave;
+USE mtr;
+call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
+
--echo "End of test"
diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test
index bfd1860759e..c96b88a1b1a 100644
--- a/mysql-test/suite/rpl/t/rpl_idempotency.test
+++ b/mysql-test/suite/rpl/t/rpl_idempotency.test
@@ -8,7 +8,8 @@ connection slave;
source include/have_innodb.inc;
# Add suppression for expected warning(s) in slaves error log
-call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032");
+call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
+call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
SET @old_slave_exec_mode= @@global.slave_exec_mode;
diff --git a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test
index 4ca0de6ec66..180821730ec 100644
--- a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test
+++ b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test
@@ -57,6 +57,7 @@ source include/wait_for_slave_to_stop.inc;
let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1);
echo Reporting the following error: $error;
+call mtr.add_suppression("Failed during slave I/O thread initialization");
SET GLOBAL debug= "";
diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
index 39f3b700f94..437e1ebb92d 100644
--- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
+++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
@@ -7,6 +7,7 @@
# 1 - Creates a table and populates it through "LOAD DATA INFILE".
# 2 - Catches error.
##########################################################################
+
--source include/have_binlog_format_mixed_or_statement.inc
--source include/have_innodb.inc
--source include/have_debug.inc
@@ -47,3 +48,5 @@ drop table t1;
connection slave;
drop table t1;
+
+call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3");
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
index d51599fd18b..f812509de6f 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
**** Diff Table Def Start ****
*** On Slave ***
STOP SLAVE;
diff --git a/mysql-test/t/almost_full.test b/mysql-test/t/almost_full.test
index 5c67ab3c088..24801f9cbc3 100644
--- a/mysql-test/t/almost_full.test
+++ b/mysql-test/t/almost_full.test
@@ -2,6 +2,8 @@
# Some special cases with empty tables
#
+call mtr.add_suppression("The table 't1' is full");
+
--disable_warnings
drop table if exists t1;
--enable_warnings
diff --git a/mysql-test/t/bug46080.test b/mysql-test/t/bug46080.test
index 7e56e3ce421..8b4cee4d8b0 100644
--- a/mysql-test/t/bug46080.test
+++ b/mysql-test/t/bug46080.test
@@ -3,6 +3,9 @@
--echo # sort_buffer_size cannot allocate
--echo #
+call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'");
+call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k");
+
CREATE TABLE t1(a CHAR(255));
INSERT INTO t1 VALUES ('a');
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index 5436b7166f4..6d8f0af0c28 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -12,5 +12,3 @@
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild.
innodb_bug39438 : Bug#42383 2009-01-28 lsoares "This fails in embedded and on windows. Note that this test is not run on windows and on embedded in PB for main trees currently"
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
-init_connect : Bug#44920 2009-07-06 pcrews MTR not processing master.opt input properly on Windows. *Must be done this way due to the nature of the bug*
-
diff --git a/mysql-test/t/events_logs_tests-master.opt b/mysql-test/t/events_logs_tests-master.opt
index 35ff7911705..3ece9710a45 100644
--- a/mysql-test/t/events_logs_tests-master.opt
+++ b/mysql-test/t/events_logs_tests-master.opt
@@ -1 +1 @@
---log-slow-queries
+--log-output=table,file --log-slow-queries
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index 9889f48237b..7318e45889a 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -407,6 +407,7 @@ SET GLOBAL myisam_data_pointer_size = 2;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+call mtr.add_suppression("mysqld: The table '.*#sql.*' is full");
--error ER_RECORD_FILE_FULL,ER_RECORD_FILE_FULL
INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
diff --git a/mysql-test/t/log_tables-master.opt b/mysql-test/t/log_tables-master.opt
index 35ff7911705..3ece9710a45 100644
--- a/mysql-test/t/log_tables-master.opt
+++ b/mysql-test/t/log_tables-master.opt
@@ -1 +1 @@
---log-slow-queries
+--log-output=table,file --log-slow-queries
diff --git a/mysql-test/t/lowercase_table3.test b/mysql-test/t/lowercase_table3.test
index 4748953fe95..f7ca8211288 100644
--- a/mysql-test/t/lowercase_table3.test
+++ b/mysql-test/t/lowercase_table3.test
@@ -9,7 +9,7 @@
--source include/have_case_insensitive_file_system.inc
--source include/not_windows.inc
-call mtr.add_suppression("Cannot find or open table test/BUG29839 from .*");
+call mtr.add_suppression("Cannot find or open table test/BUG29839 from");
--disable_warnings
DROP TABLE IF EXISTS t1,T1;
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index 578b2bf5c6c..9859e73cfae 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -853,16 +853,18 @@ while ($outer)
eval SELECT '$outer = outer loop variable after dec' AS "";
}
+# Test source in an if in a while which is false on 1st iteration
let $outer= 2; # Number of outer loops
+let $ifval= 0; # false 1st time
while ($outer)
{
- eval SELECT '$outer = outer loop variable after while' AS "";
-
- echo here is the sourced script;
+ echo outer=$outer ifval=$ifval;
- eval SELECT '$outer = outer loop variable before dec' AS "";
+ if ($ifval) {
+ --source $MYSQLTEST_VARDIR/tmp/sourced.inc
+ }
dec $outer;
- eval SELECT '$outer = outer loop variable after dec' AS "";
+ inc $ifval;
}
@@ -1663,6 +1665,20 @@ EOF
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
+# Test append_file within while
+let $outer= 2; # Number of outer loops
+while ($outer)
+{
+ append_file $MYSQLTEST_VARDIR/tmp/app_while.tmp;
+These lines should be repeated,
+if things work as expected
+EOF
+ dec $outer;
+}
+
+cat_file $MYSQLTEST_VARDIR/tmp/app_while.tmp;
+remove_file $MYSQLTEST_VARDIR/tmp/app_while.tmp;
+
# ----------------------------------------------------------------------------
# test for cat_file
# ----------------------------------------------------------------------------
@@ -1710,10 +1726,6 @@ EOF
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
--diff_files $MYSQLTEST_VARDIR/tmp/diff2.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp
-# Write the below commands to a intermediary file and execute them with
-# mysqltest in --exec, since the output will vary depending on what "diff"
-# is available it is sent to /dev/null
---write_file $MYSQLTEST_VARDIR/tmp/diff.test
# Compare files that differ in size
--error 2
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff3.tmp
@@ -1725,13 +1737,6 @@ EOF
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff4.tmp
--error 1
--diff_files $MYSQLTEST_VARDIR/tmp/diff4.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp
-exit;
-EOF
-
-# Execute the above diffs, and send their output to /dev/null - only
-# interesting to see that it returns correct error codes
---exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/diff.test > /dev/null 2>&1
-
# Compare equal files, again...
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
@@ -1740,7 +1745,6 @@ EOF
--remove_file $MYSQLTEST_VARDIR/tmp/diff2.tmp
--remove_file $MYSQLTEST_VARDIR/tmp/diff3.tmp
--remove_file $MYSQLTEST_VARDIR/tmp/diff4.tmp
---remove_file $MYSQLTEST_VARDIR/tmp/diff.test
# ----------------------------------------------------------------------------
diff --git a/mysql-test/t/not_partition.test b/mysql-test/t/not_partition.test
index 78e6c7495cf..78ca44acf18 100644
--- a/mysql-test/t/not_partition.test
+++ b/mysql-test/t/not_partition.test
@@ -15,7 +15,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
# Bug#39893: Crash if select on a partitioned table,
# when partitioning is disabled
FLUSH TABLES;
---copy_file $MYSQLTEST_VARDIR/std_data_ln/parts/t1.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file $MYSQLTEST_VARDIR/std_data/parts/t1.frm $MYSQLD_DATADIR/test/t1.frm
SELECT * FROM t1;
TRUNCATE TABLE t1;
ANALYZE TABLE t1;
diff --git a/mysql-test/t/partition_csv.test b/mysql-test/t/partition_csv.test
index dd2ef7c1d1f..44013dd4b0a 100644
--- a/mysql-test/t/partition_csv.test
+++ b/mysql-test/t/partition_csv.test
@@ -10,6 +10,8 @@
--source include/have_partition.inc
--source include/have_csv.inc
+call mtr.add_suppression("Failed to write to mysql.general_log");
+
#
# Bug#19307: Partitions: csv delete failure
# = CSV engine crashes
diff --git a/mysql-test/t/ps-master.opt b/mysql-test/t/ps-master.opt
index 3eb98fc3d6b..31c287d2bb5 100644
--- a/mysql-test/t/ps-master.opt
+++ b/mysql-test/t/ps-master.opt
@@ -1 +1 @@
---log-slow-queries --log-long-format --log-queries-not-using-indexes
+--log-output=table,file --log-slow-queries --log-long-format --log-queries-not-using-indexes
diff --git a/mysql-test/t/show_check-master.opt b/mysql-test/t/show_check-master.opt
index 7a438da06cc..aab832e2848 100644
--- a/mysql-test/t/show_check-master.opt
+++ b/mysql-test/t/show_check-master.opt
@@ -1 +1 @@
---log-slow-queries --log-long-format --log-queries-not-using-indexes --myisam-recover=""
+--log-output=table,file --log-slow-queries --log-long-format --log-queries-not-using-indexes --myisam-recover=""
diff --git a/mysql-test/t/status-master.opt b/mysql-test/t/status-master.opt
new file mode 100644
index 00000000000..eb3bb4fe50d
--- /dev/null
+++ b/mysql-test/t/status-master.opt
@@ -0,0 +1 @@
+--log-output=table,file
diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test
index d571a2efc7c..e390e8a1253 100644
--- a/mysql-test/t/upgrade.test
+++ b/mysql-test/t/upgrade.test
@@ -124,6 +124,8 @@ with_check_option=0
timestamp=2009-04-10 11:53:37
create-version=1
source=select f1 from `a-b-c`.t1 a, information_schema.tables b\nwhere a.f1 = b.table_name
+client_cs_name=utf8
+connection_cl_name=utf8_general_ci
EOF
show databases like '%a-b-c%';