List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:November 18 2010 5:05pm
Subject:bzr push into mysql-trunk-mtr branch (bjorn.munch:2987 to 2989)
View as plain text  
 2989 Bjorn Munch	2010-11-18 [merge]
      upmerge 58257

    modified:
      client/mysqltest.cc
      mysql-test/r/mysqltest.result
      mysql-test/t/mysqltest.test
 2988 Bjorn Munch	2010-11-18
      Bug #58115 MTR should restart slaves between tests if master needs restart
      As we check for servers to restart, tag the tinfo if the master is restarted,
      then check (after all other checks) for slave restarts.
      Removed suppression of UUID warning which is now avoided

    modified:
      mysql-test/include/mtr_warnings.sql
      mysql-test/mysql-test-run.pl
 2987 Bjorn Munch	2010-11-17
      Tests: more simplifications of if/while after 57276

    modified:
      mysql-test/extra/rpl_tests/rpl_row_empty_imgs.test
      mysql-test/extra/rpl_tests/rpl_row_img.test
      mysql-test/extra/rpl_tests/rpl_row_img_blobs.test
      mysql-test/extra/rpl_tests/rpl_row_img_diff_indexes.test
      mysql-test/extra/rpl_tests/rpl_stop_slave.test
      mysql-test/include/rpl_assert.inc
      mysql-test/include/rpl_chained_3_hosts.inc
      mysql-test/include/rpl_row_img_set.inc
      mysql-test/include/show_slave_status.inc
      mysql-test/include/wait_for_binlog_event.inc
      mysql-test/suite/perfschema/t/setup_actors.test
      mysql-test/suite/rpl/t/rpl_change_master.test
      mysql-test/suite/rpl/t/rpl_delayed_slave.test
      mysql-test/suite/rpl/t/rpl_packet.test
      mysql-test/suite/rpl/t/rpl_read_old_relay_log_info.test
      mysql-test/suite/rpl/t/rpl_seconds_behind_master.test
      mysql-test/suite/rpl/t/rpl_server_uuid.test
      mysql-test/t/server_uuid.test
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2010-11-17 10:23:22 +0000
+++ b/client/mysqltest.cc	2010-11-18 17:03:16 +0000
@@ -5639,7 +5639,9 @@ void do_block(enum block_cmd cmd, struct
   if (*expr_start == '!')
   {
     not_expr= TRUE;
-    expr_start++; /* Step past the '!' */
+    expr_start++; /* Step past the '!', then any whitespace */
+    while (*expr_start && my_isspace(charset_info, *expr_start))
+      expr_start++;
   }
   /* Find ending ')' */
   expr_end= strrchr(expr_start, ')');

=== modified file 'mysql-test/include/mtr_warnings.sql'
--- a/mysql-test/include/mtr_warnings.sql	2010-11-09 20:10:44 +0000
+++ b/mysql-test/include/mtr_warnings.sql	2010-11-18 15:57:46 +0000
@@ -241,9 +241,6 @@ INSERT INTO global_suppressions VALUES
   */
  ("Found lock of type 6 that is write and read locked"),
 
- /* After BUG#57840, we may restart master w/o restarting slave */
- ("The master.s UUID has changed, although this should not happen"),
-
  ("THE_LAST_SUPPRESSION")||
 
 

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2010-11-17 10:23:22 +0000
+++ b/mysql-test/mysql-test-run.pl	2010-11-18 15:57:46 +0000
@@ -4721,6 +4721,10 @@ sub stop_all_servers () {
 sub server_need_restart {
   my ($tinfo, $server)= @_;
 
+  # Mark the tinfo so slaves will restart if server restarts
+  # This assumes master will be considered first.
+  my $is_master= $server->option("#!run-master-sh");
+
   if ( using_extern() )
   {
     mtr_verbose_restart($server, "no restart for --extern server");
@@ -4729,29 +4733,34 @@ sub server_need_restart {
 
   if ( $tinfo->{'force_restart'} ) {
     mtr_verbose_restart($server, "forced in .opt file");
+    $tinfo->{master_restart}= 1 if $is_master;
     return 1;
   }
 
   if ( $opt_force_restart ) {
     mtr_verbose_restart($server, "forced restart turned on");
+    $tinfo->{master_restart}= 1 if $is_master;
     return 1;
   }
 
   if ( $tinfo->{template_path} ne $current_config_name)
   {
     mtr_verbose_restart($server, "using different config file");
+    $tinfo->{master_restart}= 1 if $is_master;
     return 1;
   }
 
   if ( $tinfo->{'master_sh'}  || $tinfo->{'slave_sh'} )
   {
     mtr_verbose_restart($server, "sh script to run");
+    $tinfo->{master_restart}= 1 if $is_master;
     return 1;
   }
 
   if ( ! started($server) )
   {
     mtr_verbose_restart($server, "not started");
+    $tinfo->{master_restart}= 1 if $is_master;
     return 1;
   }
 
@@ -4764,6 +4773,7 @@ sub server_need_restart {
     if ( timezone($started_tinfo) ne timezone($tinfo) )
     {
       mtr_verbose_restart($server, "different timezone");
+      $tinfo->{master_restart}= 1 if $is_master;
       return 1;
     }
   }
@@ -4788,6 +4798,7 @@ sub server_need_restart {
 	mtr_verbose_restart($server, "running with different options '" .
 			    join(" ", @{$extra_opts}) . "' != '" .
 			    join(" ", @{$started_opts}) . "'" );
+	$tinfo->{master_restart}= 1 if $is_master;
 	return 1;
       }
 
@@ -4804,6 +4815,7 @@ sub server_need_restart {
 	mtr_verbose("Restart: running with different options '" .
 		    join(" ", @{$extra_opts}) . "' != '" .
 		    join(" ", @{$started_opts}) . "'" );
+	$tinfo->{master_restart}= 1 if $is_master;
 	return 1;
       }
 
@@ -4812,6 +4824,11 @@ sub server_need_restart {
     }
   }
 
+  if ($server->option("#!use-slave-opt") && $tinfo->{master_restart}) {
+    mtr_verbose_restart($server, "master will be restarted");
+    return 1;
+  }
+
   # Default, no restart
   return 0;
 }

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2010-11-17 10:23:22 +0000
+++ b/mysql-test/r/mysqltest.result	2010-11-18 17:03:16 +0000
@@ -403,7 +403,9 @@ true-inner
 true-inner again
 true-outer
 Counter is greater than 0, (counter=10)
+Counter should still be 10, is 10
 Counter is not 0, (counter=0)
+Not space var works
 Counter is true, (counter=alpha)
 while with string, only once
 5<7

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2010-11-17 10:23:22 +0000
+++ b/mysql-test/t/mysqltest.test	2010-11-18 17:03:16 +0000
@@ -1141,6 +1141,11 @@ if (!$counter)
 {
   echo Counter is not 0, (counter=10);
 }
+if (! $counter)
+{
+  let $counter=5;
+}
+echo Counter should still be 10, is $counter;
 let $counter=0;
 if($counter)
 {
@@ -1150,6 +1155,10 @@ if (!$counter)
 {
   echo Counter is not 0, (counter=0);
 }
+if (! $counter)
+{
+  echo Not space var works;
+}
 
 # ----------------------------------------------------------------------------
 # Test if with some non-numerics

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-mtr branch (bjorn.munch:2987 to 2989) Bjorn Munch18 Nov