Commit c5838534 authored by Bjorn Munch's avatar Bjorn Munch

merge from 5.1-mtr

parents 916b81de ecd37e25
...@@ -417,6 +417,7 @@ static struct st_expected_errors saved_expected_errors; ...@@ -417,6 +417,7 @@ static struct st_expected_errors saved_expected_errors;
struct st_command struct st_command
{ {
char *query, *query_buf,*first_argument,*last_argument,*end; char *query, *query_buf,*first_argument,*last_argument,*end;
DYNAMIC_STRING content;
int first_word_len, query_len; int first_word_len, query_len;
my_bool abort_on_error; my_bool abort_on_error;
struct st_expected_errors expected_errors; struct st_expected_errors expected_errors;
...@@ -1140,6 +1141,8 @@ void free_used_memory() ...@@ -1140,6 +1141,8 @@ void free_used_memory()
{ {
struct st_command **q= dynamic_element(&q_lines, i, struct st_command**); struct st_command **q= dynamic_element(&q_lines, i, struct st_command**);
my_free((*q)->query_buf,MYF(MY_ALLOW_ZERO_PTR)); my_free((*q)->query_buf,MYF(MY_ALLOW_ZERO_PTR));
if ((*q)->content.str)
dynstr_free(&(*q)->content);
my_free((*q),MYF(0)); my_free((*q),MYF(0));
} }
for (i= 0; i < 10; i++) for (i= 0; i < 10; i++)
...@@ -3289,21 +3292,30 @@ void do_write_file_command(struct st_command *command, my_bool append) ...@@ -3289,21 +3292,30 @@ void do_write_file_command(struct st_command *command, my_bool append)
sizeof(write_file_args)/sizeof(struct command_arg), sizeof(write_file_args)/sizeof(struct command_arg),
' '); ' ');
/* If no delimiter was provided, use EOF */
if (ds_delimiter.length == 0)
dynstr_set(&ds_delimiter, "EOF");
if (!append && access(ds_filename.str, F_OK) == 0) if (!append && access(ds_filename.str, F_OK) == 0)
{ {
/* The file should not be overwritten */ /* The file should not be overwritten */
die("File already exist: '%s'", ds_filename.str); die("File already exist: '%s'", ds_filename.str);
} }
ds_content= command->content;
/* If it hasn't been done already by a loop iteration, fill it in */
if (! ds_content.str)
{
/* If no delimiter was provided, use EOF */
if (ds_delimiter.length == 0)
dynstr_set(&ds_delimiter, "EOF");
init_dynamic_string(&ds_content, "", 1024, 1024); init_dynamic_string(&ds_content, "", 1024, 1024);
read_until_delimiter(&ds_content, &ds_delimiter); read_until_delimiter(&ds_content, &ds_delimiter);
command->content= ds_content;
}
/* This function could be called even if "false", so check before printing */
if (cur_block->ok)
{
DBUG_PRINT("info", ("Writing to file: %s", ds_filename.str)); DBUG_PRINT("info", ("Writing to file: %s", ds_filename.str));
str_to_file2(ds_filename.str, ds_content.str, ds_content.length, append); str_to_file2(ds_filename.str, ds_content.str, ds_content.length, append);
dynstr_free(&ds_content); }
dynstr_free(&ds_filename); dynstr_free(&ds_filename);
dynstr_free(&ds_delimiter); dynstr_free(&ds_delimiter);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
...@@ -3446,12 +3458,17 @@ void do_diff_files(struct st_command *command) ...@@ -3446,12 +3458,17 @@ void do_diff_files(struct st_command *command)
die("command \"diff_files\" failed, file '%s' does not exist", die("command \"diff_files\" failed, file '%s' does not exist",
ds_filename2.str); ds_filename2.str);
if ((error= compare_files(ds_filename.str, ds_filename2.str))) if ((error= compare_files(ds_filename.str, ds_filename2.str)) &&
match_expected_error(command, error, NULL) < 0)
{ {
/* Compare of the two files failed, append them to output /* Compare of the two files failed, append them to output
so the failure can be analyzed so the failure can be analyzed, but only if it was not
expected to fail.
*/ */
show_diff(&ds_res, ds_filename.str, ds_filename2.str); show_diff(&ds_res, ds_filename.str, ds_filename2.str);
log_file.write(&ds_res);
log_file.flush();
dynstr_set(&ds_res, 0);
} }
dynstr_free(&ds_filename); dynstr_free(&ds_filename);
...@@ -7164,6 +7181,10 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) ...@@ -7164,6 +7181,10 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
run_query_normal(cn, command, flags, query, query_len, run_query_normal(cn, command, flags, query, query_len,
ds, &ds_warnings); ds, &ds_warnings);
dynstr_free(&ds_warnings);
if (command->type == Q_EVAL)
dynstr_free(&eval_query);
if (display_result_sorted) if (display_result_sorted)
{ {
/* Sort the result set and append it to result */ /* Sort the result set and append it to result */
...@@ -7194,11 +7215,8 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) ...@@ -7194,11 +7215,8 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
check_require(ds, command->require_file); check_require(ds, command->require_file);
} }
dynstr_free(&ds_warnings);
if (ds == &ds_result) if (ds == &ds_result)
dynstr_free(&ds_result); dynstr_free(&ds_result);
if (command->type == Q_EVAL)
dynstr_free(&eval_query);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -7681,7 +7699,31 @@ int main(int argc, char **argv) ...@@ -7681,7 +7699,31 @@ int main(int argc, char **argv)
command->type= Q_COMMENT; command->type= Q_COMMENT;
} }
if (cur_block->ok) my_bool ok_to_do= cur_block->ok;
/*
Some commands need to be "done" the first time if they may get
re-iterated over in a true context. This can only happen if there's
a while loop at some level above the current block.
*/
if (!ok_to_do)
{
if (command->type == Q_SOURCE ||
command->type == Q_WRITE_FILE ||
command->type == Q_APPEND_FILE ||
command->type == Q_PERL)
{
for (struct st_block *stb= cur_block-1; stb >= block_stack; stb--)
{
if (stb->cmd == cmd_while)
{
ok_to_do= 1;
break;
}
}
}
}
if (ok_to_do)
{ {
command->last_argument= command->first_argument; command->last_argument= command->first_argument;
processed = 1; processed = 1;
...@@ -7990,6 +8032,8 @@ int main(int argc, char **argv) ...@@ -7990,6 +8032,8 @@ int main(int argc, char **argv)
if (parsing_disabled) if (parsing_disabled)
die("Test ended with parsing disabled"); die("Test ended with parsing disabled");
my_bool empty_result= FALSE;
/* /*
The whole test has been executed _sucessfully_. The whole test has been executed _sucessfully_.
Time to compare result or save it to record file. Time to compare result or save it to record file.
...@@ -8029,12 +8073,21 @@ int main(int argc, char **argv) ...@@ -8029,12 +8073,21 @@ int main(int argc, char **argv)
} }
} }
else else
{
/* Empty output is an error *unless* we also have an empty result file */
if (! result_file_name || record ||
compare_files (log_file.file_name(), result_file_name))
{ {
die("The test didn't produce any output"); die("The test didn't produce any output");
} }
else
{
empty_result= TRUE; /* Meaning empty was expected */
}
}
if (!command_executed && result_file_name) if (!command_executed && result_file_name && !empty_result)
die("No queries executed but result file found!"); die("No queries executed but non-empty result file found!");
verbose_msg("Test has succeeded!"); verbose_msg("Test has succeeded!");
timer_output(); timer_output();
......
...@@ -23,3 +23,10 @@ The syntax is as follows: ...@@ -23,3 +23,10 @@ The syntax is as follows:
start with the same characters up to the last letter before the asterisk start with the same characters up to the last letter before the asterisk
are considered experimental: are considered experimental:
main.a* # get rid of main.alias, main.alibaba and main.agliolio 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
funcs_1.charset_collation_1 # depends on compile-time decisions 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.plugin_load @solaris # Bug#42144
main.ctype_gbk_binlog # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists binlog.binlog_tmp_table* # Bug#45578: Test binlog_tmp_table fails ramdonly on PB2: Unknown table 't2'
rpl.rpl_row_create_table # Bug#45576: rpl_row_create_table fails on PB2 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_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
...@@ -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 ...@@ -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. # # should stop the slave. #
################################################# #################################################
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
--echo **** Diff Table Def Start **** --echo **** Diff Table Def Start ****
############################################## ##############################################
......
...@@ -132,7 +132,7 @@ INSERT INTO global_suppressions VALUES ...@@ -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"), ("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 */ /* test case for Bug#bug29807 copies a stray frm into database */
("InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal"), ("InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal"),
...@@ -162,6 +162,8 @@ INSERT INTO global_suppressions VALUES ...@@ -162,6 +162,8 @@ INSERT INTO global_suppressions VALUES
("Slave: Unknown column 'c7' in 't15' Error_code: 1054"), ("Slave: Unknown column 'c7' in 't15' Error_code: 1054"),
("Slave: Can't DROP 'c7'.* 1091"), ("Slave: Can't DROP 'c7'.* 1091"),
("Slave: Key column 'c6'.* 1072"), ("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 */ /* Test case for Bug#31590 in order_by.test produces the following error */
("Out of sort memory; increase server sort buffer size"), ("Out of sort memory; increase server sort buffer size"),
......
...@@ -204,8 +204,10 @@ my @mysqld_rules= ...@@ -204,8 +204,10 @@ my @mysqld_rules=
{ 'port' => \&fix_port }, { 'port' => \&fix_port },
{ 'socket' => \&fix_socket }, { 'socket' => \&fix_socket },
{ '#log-error' => \&fix_log_error }, { '#log-error' => \&fix_log_error },
{ 'log' => \&fix_log }, { 'general_log' => 1 },
{ 'log-slow-queries' => \&fix_log_slow_queries }, { 'general_log_file' => \&fix_log },
{ 'slow_query_log' => 1 },
{ 'slow_query_log_file' => \&fix_log_slow_queries },
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } }, { '#user' => sub { return shift->{ARGS}->{user} || ""; } },
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } }, { '#password' => sub { return shift->{ARGS}->{password} || ""; } },
{ 'server-id' => \&fix_server_id, }, { 'server-id' => \&fix_server_id, },
......
...@@ -106,10 +106,13 @@ sub check_socket_path_length { ...@@ -106,10 +106,13 @@ sub check_socket_path_length {
my ($path)= @_; my ($path)= @_;
return 0 if IS_WINDOWS; 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; require IO::Socket::UNIX;
my $truncated= 1; # Be negative my $truncated= undef;
# Create a tempfile name with same length as "path" # Create a tempfile name with same length as "path"
my $tmpdir = tempdir( CLEANUP => 0); my $tmpdir = tempdir( CLEANUP => 0);
...@@ -122,6 +125,7 @@ sub check_socket_path_length { ...@@ -122,6 +125,7 @@ sub check_socket_path_length {
Local => $testfile, Local => $testfile,
Listen => 1, Listen => 1,
); );
$truncated= 1; # Be negatvie
die "Could not create UNIX domain socket: $!" die "Could not create UNIX domain socket: $!"
unless defined $sock; unless defined $sock;
...@@ -133,6 +137,9 @@ sub check_socket_path_length { ...@@ -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 $sock= undef; # Close socket
rmtree($tmpdir); # Remove the tempdir and any socket file created rmtree($tmpdir); # Remove the tempdir and any socket file created
return $truncated; return $truncated;
......
...@@ -163,6 +163,7 @@ int main(int argc, const char** argv ) ...@@ -163,6 +163,7 @@ int main(int argc, const char** argv )
HANDLE job_handle; HANDLE job_handle;
HANDLE wait_handles[NUM_HANDLES]= {0}; HANDLE wait_handles[NUM_HANDLES]= {0};
PROCESS_INFORMATION process_info= {0}; PROCESS_INFORMATION process_info= {0};
BOOL nocore= FALSE;
sprintf(safe_process_name, "safe_process[%d]", pid); sprintf(safe_process_name, "safe_process[%d]", pid);
...@@ -188,13 +189,20 @@ int main(int argc, const char** argv ) ...@@ -188,13 +189,20 @@ int main(int argc, const char** argv )
die("No real args -> nothing to do"); die("No real args -> nothing to do");
/* Copy the remaining args to child_arg */ /* Copy the remaining args to child_arg */
for (int j= i+1; j < argc; j++) { 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; break;
} else { } else {
if ( strcmp(arg, "--verbose") == 0 ) if (strcmp(arg, "--verbose") == 0)
verbose++; verbose++;
else if ( strncmp(arg, "--parent-pid", 10) == 0 ) else if (strncmp(arg, "--parent-pid", 10) == 0)
{ {
/* Override parent_pid with a value provided by user */ /* Override parent_pid with a value provided by user */
const char* start; const char* start;
...@@ -204,6 +212,10 @@ int main(int argc, const char** argv ) ...@@ -204,6 +212,10 @@ int main(int argc, const char** argv )
if ((parent_pid= atoi(start)) == 0) if ((parent_pid= atoi(start)) == 0)
die("Invalid value '%s' passed to --parent-id", start); die("Invalid value '%s' passed to --parent-id", start);
} }
else if (strcmp(arg, "--nocore") == 0)
{
nocore= TRUE;
}
else else
die("Unknown option: %s", arg); die("Unknown option: %s", arg);
} }
...@@ -241,6 +253,11 @@ int main(int argc, const char** argv ) ...@@ -241,6 +253,11 @@ int main(int argc, const char** argv )
&jeli, sizeof(jeli)) == 0) &jeli, sizeof(jeli)) == 0)
message("SetInformationJobObject failed, continue anyway..."); message("SetInformationJobObject failed, continue anyway...");
/* Avoid popup box */
if (nocore)
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX
| SEM_NOOPENFILEERRORBOX);
#if 0 #if 0
/* Setup stdin, stdout and stderr redirect */ /* Setup stdin, stdout and stderr redirect */
si.dwFlags= STARTF_USESTDHANDLES; si.dwFlags= STARTF_USESTDHANDLES;
......
...@@ -41,6 +41,7 @@ our $opt_with_ndbcluster_only; ...@@ -41,6 +41,7 @@ our $opt_with_ndbcluster_only;
our $defaults_file; our $defaults_file;
our $defaults_extra_file; our $defaults_extra_file;
our $reorder= 1; our $reorder= 1;
our $quick_collect;
sub collect_option { sub collect_option {
my ($opt, $value)= @_; my ($opt, $value)= @_;
...@@ -68,6 +69,9 @@ require "mtr_misc.pl"; ...@@ -68,6 +69,9 @@ require "mtr_misc.pl";
my $do_test_reg; my $do_test_reg;
my $skip_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 { sub init_pattern {
my ($from, $what)= @_; my ($from, $what)= @_;
return undef unless defined $from; return undef unless defined $from;
...@@ -102,6 +106,7 @@ sub collect_test_cases ($$) { ...@@ -102,6 +106,7 @@ sub collect_test_cases ($$) {
foreach my $suite (split(",", $suites)) foreach my $suite (split(",", $suites))
{ {
push(@$cases, collect_one_suite($suite, $opt_cases)); push(@$cases, collect_one_suite($suite, $opt_cases));
last if $some_test_found;
} }
if ( @$opt_cases ) if ( @$opt_cases )
...@@ -139,7 +144,7 @@ sub collect_test_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 # Reorder the test cases in an order that will make them faster to run
my %sort_criteria; my %sort_criteria;
...@@ -386,7 +391,7 @@ sub collect_one_suite($) ...@@ -386,7 +391,7 @@ sub collect_one_suite($)
# Read combinations for this suite and build testcases x combinations # Read combinations for this suite and build testcases x combinations
# if any combinations exists # if any combinations exists
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
if ( ! $skip_combinations ) if ( ! $skip_combinations && ! $quick_collect )
{ {
my @combinations; my @combinations;
my $combination_file= "$suitedir/combinations"; my $combination_file= "$suitedir/combinations";
...@@ -644,6 +649,12 @@ sub optimize_cases { ...@@ -644,6 +649,12 @@ sub optimize_cases {
if ( $default_engine =~ /^innodb/i ); if ( $default_engine =~ /^innodb/i );
} }
} }
if ($quick_collect && ! $tinfo->{'skip'})
{
$some_test_found= 1;
return;
}
} }
} }
...@@ -908,14 +919,14 @@ sub collect_one_test_case { ...@@ -908,14 +919,14 @@ sub collect_one_test_case {
if ( $tinfo->{'big_test'} and ! $::opt_big_test ) if ( $tinfo->{'big_test'} and ! $::opt_big_test )
{ {
$tinfo->{'skip'}= 1; $tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "Test need 'big-test' option"; $tinfo->{'comment'}= "Test needs 'big-test' option";
return $tinfo return $tinfo
} }
if ( $tinfo->{'need_debug'} && ! $::debug_compiled_binaries ) if ( $tinfo->{'need_debug'} && ! $::debug_compiled_binaries )
{ {
$tinfo->{'skip'}= 1; $tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "Test need debug binaries"; $tinfo->{'comment'}= "Test needs debug binaries";
return $tinfo return $tinfo
} }
...@@ -951,14 +962,14 @@ sub collect_one_test_case { ...@@ -951,14 +962,14 @@ sub collect_one_test_case {
if ($tinfo->{'federated_test'}) 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->{'master_opt'}}, "--loose-federated");
push(@{$tinfo->{'slave_opt'}}, "--loose-federated"); push(@{$tinfo->{'slave_opt'}}, "--loose-federated");
} }
if ( $tinfo->{'innodb_test'} ) if ( $tinfo->{'innodb_test'} )
{ {
# This is a test that need innodb # This is a test that needs innodb
if ( $::mysqld_variables{'innodb'} eq "OFF" || if ( $::mysqld_variables{'innodb'} eq "OFF" ||
! exists $::mysqld_variables{'innodb'} ) ! exists $::mysqld_variables{'innodb'} )
{ {
...@@ -979,7 +990,7 @@ sub collect_one_test_case { ...@@ -979,7 +990,7 @@ sub collect_one_test_case {
if (grep(/^--skip-log-bin/, @::opt_extra_mysqld_opt) ) if (grep(/^--skip-log-bin/, @::opt_extra_mysqld_opt) )
{ {
$tinfo->{'skip'}= 1; $tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "Test need binlog"; $tinfo->{'comment'}= "Test needs binlog";
return $tinfo; return $tinfo;
} }
} }
......
...@@ -134,8 +134,8 @@ sub mtr_report_test ($) { ...@@ -134,8 +134,8 @@ sub mtr_report_test ($) {
# an asterisk at the end, determine if the characters up to # an asterisk at the end, determine if the characters up to
# but excluding the asterisk are the same # but excluding the asterisk are the same
if ( $exp ne "" && substr($exp, -1, 1) eq "*" ) { if ( $exp ne "" && substr($exp, -1, 1) eq "*" ) {
$exp = substr($exp, 0, length($exp) - 1); my $nexp = substr($exp, 0, length($exp) - 1);
if ( substr($test_name, 0, length($exp)) ne $exp ) { if ( substr($test_name, 0, length($nexp)) ne $nexp ) {
# no match, try next entry # no match, try next entry
next; next;
} }
......
# 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
...@@ -32,6 +32,7 @@ sub mtr_options_from_test_file($$); ...@@ -32,6 +32,7 @@ sub mtr_options_from_test_file($$);
my $do_test; my $do_test;
my $skip_test; my $skip_test;
my %incompatible;
sub init_pattern { sub init_pattern {
my ($from, $what)= @_; my ($from, $what)= @_;
...@@ -47,6 +48,15 @@ sub init_pattern { ...@@ -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 ($) { ...@@ -58,6 +68,8 @@ sub collect_test_cases ($) {
$do_test= init_pattern($::opt_do_test, "--do-test"); $do_test= init_pattern($::opt_do_test, "--do-test");
$skip_test= init_pattern($::opt_skip_test, "--skip-test"); $skip_test= init_pattern($::opt_skip_test, "--skip-test");
collect_incomp_tests();
my $suites= shift; # Semicolon separated list of test suites my $suites= shift; # Semicolon separated list of test suites
my $cases = []; # Array of hash my $cases = []; # Array of hash
...@@ -528,6 +540,17 @@ sub collect_one_test_case($$$$$$$$$) { ...@@ -528,6 +540,17 @@ sub collect_one_test_case($$$$$$$$$) {
$tinfo->{'component_id'} = $component_id; $tinfo->{'component_id'} = $component_id;
push(@$cases, $tinfo); 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 # Skip some tests but include in list, just mark them to skip
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
...@@ -841,7 +864,7 @@ sub collect_one_test_case($$$$$$$$$) { ...@@ -841,7 +864,7 @@ sub collect_one_test_case($$$$$$$$$) {
if ( $tinfo->{'innodb_test'} ) if ( $tinfo->{'innodb_test'} )
{ {
# This is a test that need innodb # 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 # innodb is not supported, skip it
$tinfo->{'skip'}= 1; $tinfo->{'skip'}= 1;
......
...@@ -209,6 +209,7 @@ sub check_timeout { return $opt_testcase_timeout * 6; }; ...@@ -209,6 +209,7 @@ sub check_timeout { return $opt_testcase_timeout * 6; };
my $opt_start; my $opt_start;
my $opt_start_dirty; my $opt_start_dirty;
my $start_only;
my $opt_wait_all; my $opt_wait_all;
my $opt_repeat= 1; my $opt_repeat= 1;
my $opt_retry= 3; my $opt_retry= 3;
...@@ -984,6 +985,9 @@ sub command_line_setup { ...@@ -984,6 +985,9 @@ sub command_line_setup {
if ( $opt_experimental ) 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 # read the list of experimental test cases from the file specified on
# the command line # the command line
open(FILE, "<", $opt_experimental) or mtr_error("Can't read experimental file: $opt_experimental"); open(FILE, "<", $opt_experimental) or mtr_error("Can't read experimental file: $opt_experimental");
...@@ -994,6 +998,15 @@ sub command_line_setup { ...@@ -994,6 +998,15 @@ sub command_line_setup {
# remove comments (# foo) at the beginning of the line, or after a # remove comments (# foo) at the beginning of the line, or after a
# blank at the end of the line # blank at the end of the line
s/( +|^)#.*$//; 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 # remove whitespace
s/^ +//; s/^ +//;
s/ +$//; s/ +$//;
...@@ -1241,13 +1254,28 @@ sub command_line_setup { ...@@ -1241,13 +1254,28 @@ sub command_line_setup {
{ {
mtr_error("Can't use --extern when using debugger"); 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 # 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"); mtr_error("--wait-all can only be used with --start or --start-dirty");
} }
...@@ -1506,6 +1534,10 @@ sub collect_mysqld_features_from_running_server () ...@@ -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 # Parse version
my $version_str= $mysqld_variables{'version'}; my $version_str= $mysqld_variables{'version'};
if ( $version_str =~ /^([0-9]*)\.([0-9]*)\.([0-9]*)/ ) if ( $version_str =~ /^([0-9]*)\.([0-9]*)\.([0-9]*)/ )
...@@ -1772,7 +1804,8 @@ sub environment_setup { ...@@ -1772,7 +1804,8 @@ sub environment_setup {
} }
my $lib_example_plugin= my $lib_example_plugin=
mtr_file_exists(vs_config_dirs('storage/example',$plugin_filename), 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'}= $ENV{'EXAMPLE_PLUGIN'}=
($lib_example_plugin ? basename($lib_example_plugin) : ""); ($lib_example_plugin ? basename($lib_example_plugin) : "");
$ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=". $ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=".
...@@ -2811,7 +2844,7 @@ sub run_testcase_check_skip_test($) ...@@ -2811,7 +2844,7 @@ sub run_testcase_check_skip_test($)
if ( $tinfo->{'skip'} ) if ( $tinfo->{'skip'} )
{ {
mtr_report_test_skipped($tinfo); mtr_report_test_skipped($tinfo) unless $start_only;
return 1; return 1;
} }
...@@ -3298,9 +3331,16 @@ sub run_testcase ($) { ...@@ -3298,9 +3331,16 @@ sub run_testcase ($) {
# server exits # server exits
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
if ( $opt_start or $opt_start_dirty ) if ( $start_only )
{ {
mtr_print("\nStarted", started(all_servers())); 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..."); mtr_print("Waiting for server(s) to exit...");
if ( $opt_wait_all ) { if ( $opt_wait_all ) {
My::SafeProcess->wait_all(); My::SafeProcess->wait_all();
...@@ -3542,8 +3582,8 @@ sub run_testcase ($) { ...@@ -3542,8 +3582,8 @@ sub run_testcase ($) {
# error log and write all lines that look # error log and write all lines that look
# suspicious into $error_log.warnings # suspicious into $error_log.warnings
# #
sub extract_warning_lines ($) { sub extract_warning_lines ($$) {
my ($error_log) = @_; my ($error_log, $tname) = @_;
# Open the servers .err log file and read all lines # Open the servers .err log file and read all lines
# belonging to current tets into @lines # belonging to current tets into @lines
...@@ -3551,15 +3591,28 @@ sub extract_warning_lines ($) { ...@@ -3551,15 +3591,28 @@ sub extract_warning_lines ($) {
or mtr_error("Could not open file '$error_log' for reading: $!"); or mtr_error("Could not open file '$error_log' for reading: $!");
my @lines; my @lines;
my $found_test= 0; # Set once we've found the log of this test
while ( my $line = <$Ferr> ) 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:/)
{ {
# Throw away lines from previous tests @lines= ();
@lines = (); $found_test= $line =~ /^CURRENT_TEST: $tname/;
} }
else
{
push(@lines, $line); push(@lines, $line);
} }
}
else
{
# Search for beginning of test, until found
$found_test= 1 if ($line =~ /^CURRENT_TEST: $tname/);
}
}
$Ferr = undef; # Close error log file $Ferr = undef; # Close error log file
# mysql_client_test.test sends a COM_DEBUG packet to the server # mysql_client_test.test sends a COM_DEBUG packet to the server
...@@ -3595,10 +3648,8 @@ sub extract_warning_lines ($) { ...@@ -3595,10 +3648,8 @@ sub extract_warning_lines ($) {
# and correcting them shows a few additional harmless warnings. # and correcting them shows a few additional harmless warnings.
# Thus those patterns are temporarily removed from the list # Thus those patterns are temporarily removed from the list
# of patterns. For more info see BUG#42408 # of patterns. For more info see BUG#42408
# qr/^Warning:|mysqld: Warning|\[Warning\]/, qr/^Warning:|mysqld: Warning|\[Warning\]/,
# qr/^Error:|\[ERROR\]/, qr/^Error:|\[ERROR\]/,
qr/^Warning:|mysqld: Warning/,
qr/^Error:/,
qr/^==.* at 0x/, qr/^==.* at 0x/,
qr/InnoDB: Warning|InnoDB: Error/, qr/InnoDB: Warning|InnoDB: Error/,
qr/^safe_mutex:|allocated at line/, qr/^safe_mutex:|allocated at line/,
...@@ -3638,7 +3689,7 @@ sub start_check_warnings ($$) { ...@@ -3638,7 +3689,7 @@ sub start_check_warnings ($$) {
my $log_error= $mysqld->value('#log-error'); my $log_error= $mysqld->value('#log-error');
# To be communicated to the test # To be communicated to the test
$ENV{MTR_LOG_ERROR}= $log_error; $ENV{MTR_LOG_ERROR}= $log_error;
extract_warning_lines($log_error); extract_warning_lines($log_error, $tinfo->{name});
my $args; my $args;
mtr_init_args(\$args); mtr_init_args(\$args);
...@@ -4078,8 +4129,8 @@ sub mysqld_arguments ($$$) { ...@@ -4078,8 +4129,8 @@ sub mysqld_arguments ($$$) {
if ( $mysql_version_id >= 50106 ) if ( $mysql_version_id >= 50106 )
{ {
# Turn on logging to both tables and file # Turn on logging to file
mtr_add_arg($args, "--log-output=table,file"); mtr_add_arg($args, "--log-output=file");
} }
# Check if "extra_opt" contains skip-log-bin # Check if "extra_opt" contains skip-log-bin
...@@ -5123,7 +5174,7 @@ Options to control what test suites or cases to run ...@@ -5123,7 +5174,7 @@ Options to control what test suites or cases to run
skip-rpl Skip the replication test cases. skip-rpl Skip the replication test cases.
big-test Also run tests marked as "big" big-test Also run tests marked as "big"
enable-disabled Run also tests marked as disabled 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. selected tests, in the order they would be run.
Options that specify ports Options that specify ports
......
call mtr.add_suppression("The table 't1' is full");
drop table if exists t1; drop table if exists t1;
set global myisam_data_pointer_size=2; set global myisam_data_pointer_size=2;
CREATE TABLE t1 (a int auto_increment primary key not null, b longtext) ENGINE=MyISAM; CREATE TABLE t1 (a int auto_increment primary key not null, b longtext) ENGINE=MyISAM;
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Bug #46080: group_concat(... order by) crashes server when # Bug #46080: group_concat(... order by) crashes server when
# sort_buffer_size cannot allocate # 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)); CREATE TABLE t1(a CHAR(255));
INSERT INTO t1 VALUES ('a'); INSERT INTO t1 VALUES ('a');
SET @@SESSION.sort_buffer_size=5*16*1000000; SET @@SESSION.sort_buffer_size=5*16*1000000;
......
...@@ -841,6 +841,7 @@ SET max_heap_table_size = 16384; ...@@ -841,6 +841,7 @@ SET max_heap_table_size = 16384;
SET @old_myisam_data_pointer_size = @@myisam_data_pointer_size; SET @old_myisam_data_pointer_size = @@myisam_data_pointer_size;
SET GLOBAL myisam_data_pointer_size = 2; SET GLOBAL myisam_data_pointer_size = 2;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5); 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; 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 Got one of the listed errors
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size; SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
......
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; DROP TABLE IF EXISTS t1,T1;
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
SELECT * FROM T1; SELECT * FROM T1;
......
...@@ -314,21 +314,10 @@ here is the sourced script ...@@ -314,21 +314,10 @@ here is the sourced script
1 = outer loop variable before dec 1 = outer loop variable before dec
0 = outer loop variable after dec 0 = outer loop variable after dec
outer=2 ifval=0
2 = outer loop variable after while outer=1 ifval=1
here is the sourced script 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 In loop
here is the sourced script here is the sourced script
...@@ -538,6 +527,10 @@ mysqltest: At line 1: Missing required argument 'filename' to command 'write_fil ...@@ -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 mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
Content for test_file1 Content for test_file1
mysqltest: At line 1: File already exist: 'MYSQLTEST_VARDIR/tmp/test_file1.tmp' 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 Some data
for cat_file command for cat_file command
of mysqltest of mysqltest
......
call mtr.add_suppression("Failed to write to mysql.general_log");
drop table if exists t1; drop table if exists t1;
create table t1 (a int) create table t1 (a int)
engine = csv engine = csv
......
...@@ -108,11 +108,7 @@ a-b-c ...@@ -108,11 +108,7 @@ a-b-c
show create view `a-b-c`.v1; show create view `a-b-c`.v1;
View Create View character_set_client collation_connection 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 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; select * from `a-b-c`.v1;
f1 f1
Warnings:
Note 1600 Creation context of view `a-b-c`.`v1' is invalid
drop database `a-b-c`; drop database `a-b-c`;
use test; use test;
call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
select @@innodb_file_format; select @@innodb_file_format;
@@innodb_file_format @@innodb_file_format
Antelope Antelope
......
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.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 $format=`select @@innodb_file_format`;
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
......
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; 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); INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
FLUSH TABLES; FLUSH TABLES;
......
# test the auto-recover (--myisam-recover) of partitioned myisam tables # 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 --source include/have_partition.inc
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
......
reset master; reset master;
call mtr.add_suppression("Failed during slave thread initialization"); call mtr.add_suppression("Failed during slave I/O thread initialization");
stop slave; stop slave;
reset slave; reset slave;
SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
......
...@@ -166,4 +166,7 @@ DROP FUNCTION upgrade_del_func; ...@@ -166,4 +166,7 @@ DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func; DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db; DROP DATABASE bug42217_db;
DROP USER 'create_rout_db'@'localhost'; 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" "End of test"
...@@ -4,6 +4,7 @@ reset master; ...@@ -4,6 +4,7 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
**** Diff Table Def Start **** **** Diff Table Def Start ****
*** On Slave *** *** On Slave ***
STOP SLAVE; STOP SLAVE;
......
...@@ -4,6 +4,7 @@ reset master; ...@@ -4,6 +4,7 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
**** Diff Table Def Start **** **** Diff Table Def Start ****
*** On Slave *** *** On Slave ***
STOP SLAVE; STOP SLAVE;
......
...@@ -4,7 +4,8 @@ reset master; ...@@ -4,7 +4,8 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; 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"); 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; SET @old_slave_exec_mode= @@global.slave_exec_mode;
CREATE TABLE t1 (a INT PRIMARY KEY); CREATE TABLE t1 (a INT PRIMARY KEY);
......
...@@ -9,6 +9,7 @@ reset slave; ...@@ -9,6 +9,7 @@ reset slave;
SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
start slave; start slave;
Reporting the following error: Failed during slave thread initialization Reporting the following error: Failed during slave thread initialization
call mtr.add_suppression("Failed during slave I/O thread initialization");
SET GLOBAL debug= ""; SET GLOBAL debug= "";
stop slave; stop slave;
reset slave; reset slave;
......
...@@ -51,3 +51,4 @@ Last_SQL_Errno 9 ...@@ -51,3 +51,4 @@ Last_SQL_Errno 9
Last_SQL_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed Last_SQL_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed
drop table t1; drop table t1;
drop table t1; drop table t1;
call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3");
...@@ -11,5 +11,3 @@ ...@@ -11,5 +11,3 @@
############################################################################## ##############################################################################
rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx 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*
...@@ -15,7 +15,7 @@ reset master; ...@@ -15,7 +15,7 @@ reset master;
connection slave; connection slave;
# Add suppression for expected warnings in slaves error log # 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 --disable_warnings
stop slave; stop slave;
......
...@@ -208,4 +208,9 @@ DROP FUNCTION upgrade_alter_func; ...@@ -208,4 +208,9 @@ DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db; DROP DATABASE bug42217_db;
DROP USER 'create_rout_db'@'localhost'; 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" --echo "End of test"
...@@ -8,7 +8,8 @@ connection slave; ...@@ -8,7 +8,8 @@ connection slave;
source include/have_innodb.inc; source include/have_innodb.inc;
# Add suppression for expected warning(s) in slaves error log # 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"); 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; SET @old_slave_exec_mode= @@global.slave_exec_mode;
......
...@@ -57,6 +57,7 @@ source include/wait_for_slave_to_stop.inc; ...@@ -57,6 +57,7 @@ source include/wait_for_slave_to_stop.inc;
let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1); let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1);
echo Reporting the following error: $error; echo Reporting the following error: $error;
call mtr.add_suppression("Failed during slave I/O thread initialization");
SET GLOBAL debug= ""; SET GLOBAL debug= "";
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
# 1 - Creates a table and populates it through "LOAD DATA INFILE". # 1 - Creates a table and populates it through "LOAD DATA INFILE".
# 2 - Catches error. # 2 - Catches error.
########################################################################## ##########################################################################
--source include/have_binlog_format_mixed_or_statement.inc --source include/have_binlog_format_mixed_or_statement.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_debug.inc --source include/have_debug.inc
...@@ -47,3 +48,5 @@ drop table t1; ...@@ -47,3 +48,5 @@ drop table t1;
connection slave; connection slave;
drop table t1; drop table t1;
call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3");
...@@ -4,6 +4,7 @@ reset master; ...@@ -4,6 +4,7 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
**** Diff Table Def Start **** **** Diff Table Def Start ****
*** On Slave *** *** On Slave ***
STOP SLAVE; STOP SLAVE;
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Some special cases with empty tables # Some special cases with empty tables
# #
call mtr.add_suppression("The table 't1' is full");
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
--echo # sort_buffer_size cannot allocate --echo # sort_buffer_size cannot allocate
--echo # --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)); CREATE TABLE t1(a CHAR(255));
INSERT INTO t1 VALUES ('a'); INSERT INTO t1 VALUES ('a');
......
...@@ -12,5 +12,3 @@ ...@@ -12,5 +12,3 @@
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild. 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" 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 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*
--log-slow-queries --log-output=table,file --log-slow-queries
...@@ -407,6 +407,7 @@ SET GLOBAL myisam_data_pointer_size = 2; ...@@ -407,6 +407,7 @@ SET GLOBAL myisam_data_pointer_size = 2;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5); 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 --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; INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
......
--log-slow-queries --log-output=table,file --log-slow-queries
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
--source include/have_case_insensitive_file_system.inc --source include/have_case_insensitive_file_system.inc
--source include/not_windows.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 --disable_warnings
DROP TABLE IF EXISTS t1,T1; DROP TABLE IF EXISTS t1,T1;
......
...@@ -853,16 +853,18 @@ while ($outer) ...@@ -853,16 +853,18 @@ while ($outer)
eval SELECT '$outer = outer loop variable after dec' AS ""; 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 $outer= 2; # Number of outer loops
let $ifval= 0; # false 1st time
while ($outer) while ($outer)
{ {
eval SELECT '$outer = outer loop variable after while' AS ""; echo outer=$outer ifval=$ifval;
echo here is the sourced script;
eval SELECT '$outer = outer loop variable before dec' AS ""; if ($ifval) {
--source $MYSQLTEST_VARDIR/tmp/sourced.inc
}
dec $outer; dec $outer;
eval SELECT '$outer = outer loop variable after dec' AS ""; inc $ifval;
} }
...@@ -1663,6 +1665,20 @@ EOF ...@@ -1663,6 +1665,20 @@ EOF
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp; 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 # test for cat_file
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
...@@ -1710,10 +1726,6 @@ EOF ...@@ -1710,10 +1726,6 @@ EOF
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
--diff_files $MYSQLTEST_VARDIR/tmp/diff2.tmp $MYSQLTEST_VARDIR/tmp/diff1.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 # Compare files that differ in size
--error 2 --error 2
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff3.tmp --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff3.tmp
...@@ -1725,13 +1737,6 @@ EOF ...@@ -1725,13 +1737,6 @@ EOF
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff4.tmp --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff4.tmp
--error 1 --error 1
--diff_files $MYSQLTEST_VARDIR/tmp/diff4.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp --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... # Compare equal files, again...
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
...@@ -1740,7 +1745,6 @@ EOF ...@@ -1740,7 +1745,6 @@ EOF
--remove_file $MYSQLTEST_VARDIR/tmp/diff2.tmp --remove_file $MYSQLTEST_VARDIR/tmp/diff2.tmp
--remove_file $MYSQLTEST_VARDIR/tmp/diff3.tmp --remove_file $MYSQLTEST_VARDIR/tmp/diff3.tmp
--remove_file $MYSQLTEST_VARDIR/tmp/diff4.tmp --remove_file $MYSQLTEST_VARDIR/tmp/diff4.tmp
--remove_file $MYSQLTEST_VARDIR/tmp/diff.test
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
......
...@@ -15,7 +15,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`; ...@@ -15,7 +15,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
# Bug#39893: Crash if select on a partitioned table, # Bug#39893: Crash if select on a partitioned table,
# when partitioning is disabled # when partitioning is disabled
FLUSH TABLES; 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; SELECT * FROM t1;
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
ANALYZE TABLE t1; ANALYZE TABLE t1;
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
--source include/have_partition.inc --source include/have_partition.inc
--source include/have_csv.inc --source include/have_csv.inc
call mtr.add_suppression("Failed to write to mysql.general_log");
# #
# Bug#19307: Partitions: csv delete failure # Bug#19307: Partitions: csv delete failure
# = CSV engine crashes # = CSV engine crashes
......
--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
--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=""
--log-output=table,file
...@@ -124,6 +124,8 @@ with_check_option=0 ...@@ -124,6 +124,8 @@ with_check_option=0
timestamp=2009-04-10 11:53:37 timestamp=2009-04-10 11:53:37
create-version=1 create-version=1
source=select f1 from `a-b-c`.t1 a, information_schema.tables b\nwhere a.f1 = b.table_name 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 EOF
show databases like '%a-b-c%'; show databases like '%a-b-c%';
......
...@@ -2119,8 +2119,7 @@ static void init_signals(void) ...@@ -2119,8 +2119,7 @@ static void init_signals(void)
win_install_sigabrt_handler(); win_install_sigabrt_handler();
if(opt_console) if(opt_console)
SetConsoleCtrlHandler(console_event_handler,TRUE); SetConsoleCtrlHandler(console_event_handler,TRUE);
else
{
/* Avoid MessageBox()es*/ /* Avoid MessageBox()es*/
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
...@@ -2136,8 +2135,8 @@ static void init_signals(void) ...@@ -2136,8 +2135,8 @@ static void init_signals(void)
exception filter is not guaranteed to work in all situation exception filter is not guaranteed to work in all situation
(like heap corruption or stack overflow) (like heap corruption or stack overflow)
*/ */
SetErrorMode(SetErrorMode(0)|SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); SetErrorMode(SetErrorMode(0) | SEM_FAILCRITICALERRORS
} | SEM_NOOPENFILEERRORBOX);
SetUnhandledExceptionFilter(my_unhandler_exception_filter); SetUnhandledExceptionFilter(my_unhandler_exception_filter);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment