List:Commits« Previous MessageNext Message »
From:kent Date:March 11 2006 12:53am
Subject:bk commit into 5.1 tree (kent:1.2163)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of kent. When kent does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2163 06/03/11 01:53:30 kent@stripped +2 -0
  Merge

  mysql-test/mysql-test-run.pl
    1.86 06/03/11 01:53:23 kent@stripped +0 -6

  mysql-test/lib/mtr_cases.pl
    1.19 06/03/11 01:50:26 kent@stripped +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	kent
# Host:	c-4c4072d5.010-2112-6f72651.cust.bredbandsbolaget.se
# Root:	/Users/kent/mysql/bk/mysql-5.1-new/RESYNC

--- 1.18/mysql-test/lib/mtr_cases.pl	2006-03-09 18:41:18 +01:00
+++ 1.19/mysql-test/lib/mtr_cases.pl	2006-03-11 01:50:26 +01:00
@@ -155,11 +155,24 @@
   if ( $::opt_reorder )
   {
     @$cases = sort {
-      if ( $a->{'master_restart'} and $b->{'master_restart'} or
-           ! $a->{'master_restart'} and ! $b->{'master_restart'} )
+      if ( ! $a->{'master_restart'} and ! $b->{'master_restart'} )
       {
         return $a->{'name'} cmp $b->{'name'};
       }
+
+      if ( $a->{'master_restart'} and $b->{'master_restart'} )
+      {
+        my $cmp= mtr_cmp_opts($a->{'master_opt'}, $b->{'master_opt'});
+        if ( $cmp == 0 )
+        {
+          return $a->{'name'} cmp $b->{'name'};
+        }
+        else
+        {
+          return $cmp;
+        }
+      }
+
       if ( $a->{'master_restart'} )
       {
         return 1;                 # Is greater

--- 1.85/mysql-test/mysql-test-run.pl	2006-03-09 19:06:06 +01:00
+++ 1.86/mysql-test/mysql-test-run.pl	2006-03-11 01:53:23 +01:00
@@ -481,9 +481,9 @@
   if ( $glob_cygwin_perl )
   {
     # Windows programs like 'mysqld' needs Windows paths
-    $glob_mysql_test_dir= `cygpath -m $glob_mysql_test_dir`;
+    $glob_mysql_test_dir= `cygpath -m "$glob_mysql_test_dir"`;
     my $shell= $ENV{'SHELL'} || "/bin/bash";
-    $glob_cygwin_shell=   `cygpath -w $shell`; # The Windows path c:\...
+    $glob_cygwin_shell=   `cygpath -w "$shell"`; # The Windows path c:\...
     chomp($glob_mysql_test_dir);
     chomp($glob_cygwin_shell);
   }
@@ -2031,13 +2031,37 @@
 
   if ( ! $glob_use_running_server and ! $glob_use_embedded_server )
   {
-    if ( $tinfo->{'master_restart'} or
-         $master->[0]->{'running_master_is_special'} or
-	 # Stop if cluster is started but test cases does not need cluster
-	 ( $opt_with_ndbcluster && $tinfo->{'ndb_test'} != $using_ndbcluster_master ) )
+    # We try to find out if we are to restart the server
+    my $do_restart= 0;          # Assumes we don't have to
+
+    if ( $tinfo->{'master_sh'} )
+    {
+      $do_restart= 1;           # Always restart if script to run
+    }
+    elsif ( $opt_with_ndbcluster and $tinfo->{'ndb_test'} != $using_ndbcluster_master )
+    {
+      $do_restart= 1;           # Restart without cluster
+    }
+    elsif ( $master->[0]->{'running_master_is_special'} and
+            $master->[0]->{'running_master_is_special'}->{'timezone'} eq
+            $tinfo->{'timezone'} and
+            mtr_same_opts($master->[0]->{'running_master_is_special'}->{'master_opt'},
+                          $tinfo->{'master_opt'}) )
+    {
+      # If running master was started with special settings, but
+      # the current test requuires the same ones, we *don't* restart.
+      $do_restart= 0;
+    }
+    elsif ( $tinfo->{'master_restart'} or
+            $master->[0]->{'running_master_is_special'} )
+    {
+      $do_restart= 1;
+    }
+
+    if ( $do_restart )
     {
       stop_masters();
-      $master->[0]->{'running_master_is_special'}= 0; # Forget why we stopped
+      delete $master->[0]->{'running_master_is_special'}; # Forget history
     }
 
     # ----------------------------------------------------------------------
@@ -2129,7 +2153,8 @@
 
       if ( $tinfo->{'master_restart'} )
       {
-        $master->[0]->{'running_master_is_special'}= 1;
+        # Save this test case information, so next can examine it
+        $master->[0]->{'running_master_is_special'}= $tinfo;
       }
     }
     elsif ( ! $opt_skip_im and $tinfo->{'component_id'} eq 'im' )
Thread
bk commit into 5.1 tree (kent:1.2163)kent11 Mar