List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:September 4 2009 1:21pm
Subject:bzr commit into mysql-5.4-mtr branch (Bjorn.Munch:2877)
View as plain text  
#At file:///home/bm136801/my/merge-tr/ based on revid:joerg@stripped

 2877 Bjorn Munch	2009-09-04 [merge]
      initial merge from 5.1-mtr

    added:
      mysql-test/lib/v1/incompatible.tests
      mysql-test/t/status-master.opt
    modified:
      .bzr-mysql/default.conf
      client/mysqltest.cc
      mysql-test/collections/README.experimental
      mysql-test/collections/default.experimental
      mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
      mysql-test/include/mtr_warnings.sql
      mysql-test/lib/My/ConfigFactory.pm
      mysql-test/lib/My/Platform.pm
      mysql-test/lib/My/SafeProcess/safe_process_win.cc
      mysql-test/lib/mtr_cases.pm
      mysql-test/lib/mtr_report.pm
      mysql-test/lib/v1/mtr_cases.pl
      mysql-test/mysql-test-run.pl
      mysql-test/r/almost_full.result
      mysql-test/r/insert_select.result
      mysql-test/r/lowercase_table3.result
      mysql-test/r/mysqltest.result
      mysql-test/r/partition_csv.result
      mysql-test/r/upgrade.result
      mysql-test/suite/innodb/r/innodb_file_format.result
      mysql-test/suite/innodb/t/innodb_file_format.test
      mysql-test/suite/parts/r/partition_recover_myisam.result
      mysql-test/suite/parts/t/partition_recover_myisam.test
      mysql-test/suite/rpl/r/rpl_bug33931.result
      mysql-test/suite/rpl/r/rpl_do_grant.result
      mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
      mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
      mysql-test/suite/rpl/r/rpl_idempotency.result
      mysql-test/suite/rpl/r/rpl_init_slave_errors.result
      mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
      mysql-test/suite/rpl/t/disabled.def
      mysql-test/suite/rpl/t/rpl_bug33931.test
      mysql-test/suite/rpl/t/rpl_do_grant.test
      mysql-test/suite/rpl/t/rpl_idempotency.test
      mysql-test/suite/rpl/t/rpl_init_slave_errors.test
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
      mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
      mysql-test/t/almost_full.test
      mysql-test/t/disabled.def
      mysql-test/t/events_logs_tests-master.opt
      mysql-test/t/insert_select.test
      mysql-test/t/log_tables-master.opt
      mysql-test/t/lowercase_table3.test
      mysql-test/t/mysqltest.test
      mysql-test/t/partition_csv.test
      mysql-test/t/ps-master.opt
      mysql-test/t/show_check-master.opt
      mysql-test/t/upgrade.test
      sql/mysqld.cc
=== modified file '.bzr-mysql/default.conf'
--- a/.bzr-mysql/default.conf	2009-08-29 19:26:00 +0000
+++ b/.bzr-mysql/default.conf	2009-09-04 13:20:58 +0000
@@ -1,4 +1,4 @@
 [MYSQL]
 post_commit_to = "commits@stripped"
 post_push_to = "commits@stripped"
-tree_name = "mysql-5.4"
+tree_name = "mysql-5.4-mtr"

=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2009-06-29 14:00:47 +0000
+++ b/client/mysqltest.cc	2009-09-04 13:20:58 +0000
@@ -417,6 +417,7 @@ static struct st_expected_errors saved_e
 struct st_command
 {
   char *query, *query_buf,*first_argument,*last_argument,*end;
+  DYNAMIC_STRING content;
   int first_word_len, query_len;
   my_bool abort_on_error;
   struct st_expected_errors expected_errors;
@@ -1138,6 +1139,8 @@ void free_used_memory()
   {
     struct st_command **q= dynamic_element(&q_lines, i, struct st_command**);
     my_free((*q)->query_buf,MYF(MY_ALLOW_ZERO_PTR));
+    if ((*q)->content.str)
+      dynstr_free(&(*q)->content);
     my_free((*q),MYF(0));
   }
   for (i= 0; i < 10; i++)
@@ -3287,21 +3290,30 @@ void do_write_file_command(struct st_com
                      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)
   {
     /* The file should not be overwritten */
     die("File already exist: '%s'", ds_filename.str);
   }
 
-  init_dynamic_string(&ds_content, "", 1024, 1024);
-  read_until_delimiter(&ds_content, &ds_delimiter);
-  DBUG_PRINT("info", ("Writing to file: %s", ds_filename.str));
-  str_to_file2(ds_filename.str, ds_content.str, ds_content.length, append);
-  dynstr_free(&ds_content);
+  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);
+    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));
+    str_to_file2(ds_filename.str, ds_content.str, ds_content.length, append);
+  }
   dynstr_free(&ds_filename);
   dynstr_free(&ds_delimiter);
   DBUG_VOID_RETURN;
@@ -3444,12 +3456,17 @@ void do_diff_files(struct st_command *co
     die("command \"diff_files\" failed, file '%s' does not exist",
         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
-       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);
+    log_file.write(&ds_res);
+    log_file.flush();
+    dynstr_set(&ds_res, 0);
   }
 
   dynstr_free(&ds_filename);
@@ -7165,6 +7182,10 @@ void run_query(struct st_connection *cn,
     run_query_normal(cn, command, flags, query, query_len,
 		     ds, &ds_warnings);
 
+  dynstr_free(&ds_warnings);
+  if (command->type == Q_EVAL)
+    dynstr_free(&eval_query);
+
   if (display_result_sorted)
   {
     /* Sort the result set and append it to result */
@@ -7195,11 +7216,8 @@ void run_query(struct st_connection *cn,
     check_require(ds, command->require_file);
   }
 
-  dynstr_free(&ds_warnings);
   if (ds == &ds_result)
     dynstr_free(&ds_result);
-  if (command->type == Q_EVAL)
-    dynstr_free(&eval_query);
   DBUG_VOID_RETURN;
 }
 
@@ -7682,7 +7700,31 @@ int main(int argc, char **argv)
       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;
       processed = 1;
@@ -7991,6 +8033,8 @@ int main(int argc, char **argv)
   if (parsing_disabled)
     die("Test ended with parsing disabled");
 
+  my_bool empty_result= FALSE;
+  
   /*
     The whole test has been executed _sucessfully_.
     Time to compare result or save it to record file.
@@ -8031,11 +8075,20 @@ int main(int argc, char **argv)
   }
   else
   {
-    die("The test didn't produce any output");
+    /* 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");
+    }
+    else 
+    {
+      empty_result= TRUE;  /* Meaning empty was expected */
+    }
   }
 
-  if (!command_executed && result_file_name)
-    die("No queries executed but result file found!");
+  if (!command_executed && result_file_name && !empty_result)
+    die("No queries executed but non-empty result file found!");
 
   verbose_msg("Test has succeeded!");
   timer_output();

=== modified file 'mysql-test/collections/README.experimental'
--- a/mysql-test/collections/README.experimental	2009-02-25 14:00:17 +0000
+++ b/mysql-test/collections/README.experimental	2009-08-13 13:29:19 +0000
@@ -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

=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2009-08-13 20:45:01 +0000
+++ b/mysql-test/collections/default.experimental	2009-09-04 13:20:58 +0000
@@ -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
+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
+main.plugin_load  @solaris               # Bug #42144
+rpl.rpl_get_master_version_and_clock*    # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31

=== modified file 'mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test'
--- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test	2008-07-10 16:09:39 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test	2009-08-28 14:13:27 +0000
@@ -22,6 +22,8 @@ DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,
 #          should stop the slave.               #
 #################################################
 
+call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
+
 --echo **** Diff Table Def Start ****
 
 ##############################################

=== modified file 'mysql-test/include/mtr_warnings.sql'
--- a/mysql-test/include/mtr_warnings.sql	2009-07-10 11:35:53 +0000
+++ b/mysql-test/include/mtr_warnings.sql	2009-09-04 13:20:58 +0000
@@ -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"),

=== modified file 'mysql-test/lib/My/ConfigFactory.pm'
--- a/mysql-test/lib/My/ConfigFactory.pm	2009-03-02 12:48:35 +0000
+++ b/mysql-test/lib/My/ConfigFactory.pm	2009-06-22 14:27:05 +0000
@@ -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, },

=== modified file 'mysql-test/lib/My/Platform.pm'
--- a/mysql-test/lib/My/Platform.pm	2009-02-25 09:32:13 +0000
+++ b/mysql-test/lib/My/Platform.pm	2009-08-06 07:30:53 +0000
@@ -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;

=== modified file 'mysql-test/lib/My/SafeProcess/safe_process_win.cc'
--- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc	2009-05-14 19:56:53 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc	2009-07-23 17:01:24 +0000
@@ -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;

=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm	2009-08-26 15:43:32 +0000
+++ b/mysql-test/lib/mtr_cases.pm	2009-09-04 13:20:58 +0000
@@ -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";
@@ -584,6 +589,12 @@ sub optimize_cases {
 	  if ( $default_engine =~ /^innodb/i );
       }
     }
+
+    if ($quick_collect && ! $tinfo->{'skip'})
+    {
+      $some_test_found= 1;
+      return;
+    }
   }
 }
 
@@ -848,14 +859,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
   }
 
@@ -891,14 +902,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'} )
     {
@@ -919,7 +930,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;
     }
   }

=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm	2009-06-02 08:00:45 +0000
+++ b/mysql-test/lib/mtr_report.pm	2009-09-03 06:19:54 +0000
@@ -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;
             }

=== added file 'mysql-test/lib/v1/incompatible.tests'
--- a/mysql-test/lib/v1/incompatible.tests	1970-01-01 00:00:00 +0000
+++ b/mysql-test/lib/v1/incompatible.tests	2009-07-16 12:05:46 +0000
@@ -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

=== modified file 'mysql-test/lib/v1/mtr_cases.pl'
--- a/mysql-test/lib/v1/mtr_cases.pl	2008-11-14 14:39:12 +0000
+++ b/mysql-test/lib/v1/mtr_cases.pl	2009-07-31 09:22:57 +0000
@@ -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;

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2009-08-10 10:49:12 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-09-04 13:20:58 +0000
@@ -209,6 +209,7 @@ sub check_timeout { return $opt_testcase
 
 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
     }
   }
 
+  # "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]*)/ )
@@ -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 c
   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

=== modified file 'mysql-test/r/almost_full.result'
--- a/mysql-test/r/almost_full.result	2007-11-12 09:00:22 +0000
+++ b/mysql-test/r/almost_full.result	2009-08-25 13:56:50 +0000
@@ -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;

=== modified file 'mysql-test/r/insert_select.result'
--- a/mysql-test/r/insert_select.result	2009-07-24 12:09:35 +0000
+++ b/mysql-test/r/insert_select.result	2009-09-04 13:20:58 +0000
@@ -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;

=== modified file 'mysql-test/r/lowercase_table3.result'
--- a/mysql-test/r/lowercase_table3.result	2009-02-13 21:12:59 +0000
+++ b/mysql-test/r/lowercase_table3.result	2009-08-28 14:13:27 +0000
@@ -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;

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2009-05-27 20:54:40 +0000
+++ b/mysql-test/r/mysqltest.result	2009-09-02 09:17:33 +0000
@@ -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
-here is the sourced script
-
-2 = outer loop variable before dec
-
-1 = outer loop variable after dec
-
-1 = outer loop variable after while
+outer=2 ifval=0
+outer=1 ifval=1
 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 a
 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

=== modified file 'mysql-test/r/partition_csv.result'
--- a/mysql-test/r/partition_csv.result	2009-07-31 23:39:26 +0000
+++ b/mysql-test/r/partition_csv.result	2009-09-04 13:20:58 +0000
@@ -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

=== modified file 'mysql-test/r/upgrade.result'
--- a/mysql-test/r/upgrade.result	2009-04-30 12:46:49 +0000
+++ b/mysql-test/r/upgrade.result	2009-08-25 13:56:50 +0000
@@ -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;

=== modified file 'mysql-test/suite/innodb/r/innodb_file_format.result'
--- a/mysql-test/suite/innodb/r/innodb_file_format.result	2009-07-30 12:42:56 +0000
+++ b/mysql-test/suite/innodb/r/innodb_file_format.result	2009-09-04 13:20:58 +0000
@@ -1,3 +1,4 @@
+call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
 select @@innodb_file_format;
 @@innodb_file_format
 Antelope

=== modified file 'mysql-test/suite/innodb/t/innodb_file_format.test'
--- a/mysql-test/suite/innodb/t/innodb_file_format.test	2009-08-05 10:07:41 +0000
+++ b/mysql-test/suite/innodb/t/innodb_file_format.test	2009-09-04 13:20:58 +0000
@@ -1,5 +1,7 @@
 -- source include/have_innodb.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`;
 

=== modified file 'mysql-test/suite/parts/r/partition_recover_myisam.result'
--- a/mysql-test/suite/parts/r/partition_recover_myisam.result	2008-08-19 09:44:22 +0000
+++ b/mysql-test/suite/parts/r/partition_recover_myisam.result	2009-08-29 21:29:47 +0000
@@ -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;

=== modified file 'mysql-test/suite/parts/t/partition_recover_myisam.test'
--- a/mysql-test/suite/parts/t/partition_recover_myisam.test	2009-02-01 12:00:48 +0000
+++ b/mysql-test/suite/parts/t/partition_recover_myisam.test	2009-08-29 21:29:47 +0000
@@ -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

=== modified file 'mysql-test/suite/rpl/r/rpl_bug33931.result'
--- a/mysql-test/suite/rpl/r/rpl_bug33931.result	2009-02-11 11:56:25 +0000
+++ b/mysql-test/suite/rpl/r/rpl_bug33931.result	2009-08-28 14:13:27 +0000
@@ -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";

=== modified file 'mysql-test/suite/rpl/r/rpl_do_grant.result'
--- a/mysql-test/suite/rpl/r/rpl_do_grant.result	2009-03-18 13:48:23 +0000
+++ b/mysql-test/suite/rpl/r/rpl_do_grant.result	2009-09-01 11:38:17 +0000
@@ -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"

=== modified file 'mysql-test/suite/rpl/r/rpl_extraCol_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result	2008-11-04 07:43:21 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result	2009-08-28 14:13:27 +0000
@@ -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;

=== modified file 'mysql-test/suite/rpl/r/rpl_extraCol_myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result	2008-11-04 07:43:21 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result	2009-08-28 14:13:27 +0000
@@ -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;

=== modified file 'mysql-test/suite/rpl/r/rpl_idempotency.result'
--- a/mysql-test/suite/rpl/r/rpl_idempotency.result	2009-04-05 12:03:04 +0000
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result	2009-08-25 13:56:50 +0000
@@ -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);

=== modified file 'mysql-test/suite/rpl/r/rpl_init_slave_errors.result'
--- a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result	2009-04-06 00:22:34 +0000
+++ b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result	2009-08-28 14:13:27 +0000
@@ -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;

=== modified file 'mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result'
--- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result	2009-03-23 01:07:25 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result	2009-09-01 11:38:17 +0000
@@ -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");

=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def	2009-07-06 22:20:17 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def	2009-09-04 13:20:58 +0000
@@ -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*
-

=== modified file 'mysql-test/suite/rpl/t/rpl_bug33931.test'
--- a/mysql-test/suite/rpl/t/rpl_bug33931.test	2009-02-11 11:56:25 +0000
+++ b/mysql-test/suite/rpl/t/rpl_bug33931.test	2009-08-28 14:13:27 +0000
@@ -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;

=== modified file 'mysql-test/suite/rpl/t/rpl_do_grant.test'
--- a/mysql-test/suite/rpl/t/rpl_do_grant.test	2009-03-18 13:48:23 +0000
+++ b/mysql-test/suite/rpl/t/rpl_do_grant.test	2009-09-01 11:38:17 +0000
@@ -207,5 +207,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"

=== modified file 'mysql-test/suite/rpl/t/rpl_idempotency.test'
--- a/mysql-test/suite/rpl/t/rpl_idempotency.test	2009-04-05 12:03:04 +0000
+++ b/mysql-test/suite/rpl/t/rpl_idempotency.test	2009-08-25 13:56:50 +0000
@@ -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;

=== modified file 'mysql-test/suite/rpl/t/rpl_init_slave_errors.test'
--- a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test	2009-04-06 00:22:34 +0000
+++ b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test	2009-08-28 14:13:27 +0000
@@ -57,6 +57,7 @@ source include/wait_for_slave_to_stop.in
 
 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= "";
 

=== modified file 'mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test'
--- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test	2009-03-23 01:07:25 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test	2009-09-01 11:38:17 +0000
@@ -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");

=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result	2008-11-04 07:43:21 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result	2009-08-29 08:30:59 +0000
@@ -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;

=== modified file 'mysql-test/t/almost_full.test'
--- a/mysql-test/t/almost_full.test	2007-11-12 09:00:22 +0000
+++ b/mysql-test/t/almost_full.test	2009-08-25 13:56:50 +0000
@@ -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

=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	2009-07-06 22:20:17 +0000
+++ b/mysql-test/t/disabled.def	2009-09-04 13:20:58 +0000
@@ -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*
-

=== modified file 'mysql-test/t/events_logs_tests-master.opt'
--- a/mysql-test/t/events_logs_tests-master.opt	2006-03-01 15:27:57 +0000
+++ b/mysql-test/t/events_logs_tests-master.opt	2009-08-27 13:17:09 +0000
@@ -1 +1 @@
---log-slow-queries
+--log-output=table,file --log-slow-queries

=== modified file 'mysql-test/t/insert_select.test'
--- a/mysql-test/t/insert_select.test	2009-07-24 12:09:35 +0000
+++ b/mysql-test/t/insert_select.test	2009-09-04 13:20:58 +0000
@@ -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;
 

=== modified file 'mysql-test/t/log_tables-master.opt'
--- a/mysql-test/t/log_tables-master.opt	2006-03-06 18:03:17 +0000
+++ b/mysql-test/t/log_tables-master.opt	2009-08-27 13:17:09 +0000
@@ -1 +1 @@
---log-slow-queries
+--log-output=table,file --log-slow-queries

=== modified file 'mysql-test/t/lowercase_table3.test'
--- a/mysql-test/t/lowercase_table3.test	2009-02-13 21:12:59 +0000
+++ b/mysql-test/t/lowercase_table3.test	2009-08-28 14:13:27 +0000
@@ -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;

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2009-05-27 20:54:40 +0000
+++ b/mysql-test/t/mysqltest.test	2009-09-02 09:17:33 +0000
@@ -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 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;
-  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
 
 
 # ----------------------------------------------------------------------------

=== modified file 'mysql-test/t/partition_csv.test'
--- a/mysql-test/t/partition_csv.test	2009-07-31 23:39:26 +0000
+++ b/mysql-test/t/partition_csv.test	2009-09-04 13:20:58 +0000
@@ -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

=== modified file 'mysql-test/t/ps-master.opt'
--- a/mysql-test/t/ps-master.opt	2006-10-12 23:10:34 +0000
+++ b/mysql-test/t/ps-master.opt	2009-08-27 13:17:09 +0000
@@ -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

=== modified file 'mysql-test/t/show_check-master.opt'
--- a/mysql-test/t/show_check-master.opt	2007-08-01 06:41:13 +0000
+++ b/mysql-test/t/show_check-master.opt	2009-08-27 13:17:09 +0000
@@ -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=""

=== added file 'mysql-test/t/status-master.opt'
--- a/mysql-test/t/status-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/status-master.opt	2009-08-27 13:17:09 +0000
@@ -0,0 +1 @@
+--log-output=table,file

=== modified file 'mysql-test/t/upgrade.test'
--- a/mysql-test/t/upgrade.test	2009-04-30 12:46:49 +0000
+++ b/mysql-test/t/upgrade.test	2009-08-25 13:56:50 +0000
@@ -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%';

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-08-12 13:44:34 +0000
+++ b/sql/mysqld.cc	2009-09-04 13:20:58 +0000
@@ -2136,15 +2136,14 @@ static void init_signals(void)
   win_install_sigabrt_handler();
   if(opt_console)
     SetConsoleCtrlHandler(console_event_handler,TRUE);
-  else
-  {
+
     /* Avoid MessageBox()es*/
-   _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
-   _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
-   _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
-   _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
-   _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
-   _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
 
    /*
      Do not use SEM_NOGPFAULTERRORBOX in the following SetErrorMode (),
@@ -2153,8 +2152,8 @@ static void init_signals(void)
      exception filter is not guaranteed to work in all situation
      (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);
 }
 


Attachment: [text/bzr-bundle] bzr/bjorn.munch@sun.com-20090904132058-26renvy3lmjxcaix.bundle
Thread
bzr commit into mysql-5.4-mtr branch (Bjorn.Munch:2877) Bjorn Munch4 Sep