List:Commits« Previous MessageNext Message »
From:msvensson Date:February 9 2006 1:30pm
Subject:bk commit into 5.1 tree (msvensson:1.2097)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson 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.2097 06/02/09 13:30:34 msvensson@neptunus.(none) +3 -0
  Merge neptunus.(none):/home/msvensson/mysql/mysqltestrun_faster/my51-mysqltestrun_faster
  into  neptunus.(none):/home/msvensson/mysql/mysql-5.1

  mysql-test/mysql-test-run.pl
    1.62 06/02/09 13:30:30 msvensson@neptunus.(none) +1 -0
    Merge

  mysql-test/lib/mtr_cases.pl
    1.15 06/02/09 13:30:30 msvensson@neptunus.(none) +6 -11
    Merge 

  client/mysqltest.c
    1.179 06/02/09 13:28:00 msvensson@neptunus.(none) +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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.1/RESYNC

--- 1.61/mysql-test/mysql-test-run.pl	2006-02-07 20:54:33 +01:00
+++ 1.62/mysql-test/mysql-test-run.pl	2006-02-09 13:30:30 +01:00
@@ -1208,6 +1208,7 @@
     mkpath("$opt_vardir/log"); # Needed for mysqladmin log
     mtr_kill_leftovers();
 
+    $using_ndbcluster_master= $opt_with_ndbcluster;
     ndbcluster_stop();
     $master->[0]->{'ndbcluster'}= 1;
     ndbcluster_stop_slave();
@@ -1447,6 +1448,7 @@
   }
   if ( $using_ndbcluster_master )
   {
+    # Master already started
     return 0;
   }
   # FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null
@@ -1956,7 +1958,8 @@
   {
     if ( $tinfo->{'master_restart'} or
          $master->[0]->{'running_master_is_special'} or
-         ( $tinfo->{'ndb_test'} != $using_ndbcluster_master ) )
+	 # Stop if cluster is started but test cases does not need cluster
+	 ( $tinfo->{'ndb_test'} != $using_ndbcluster_master ) )
     {
       stop_masters();
       $master->[0]->{'running_master_is_special'}= 0; # Forget why we stopped
@@ -2011,12 +2014,16 @@
     {
       if ( $master->[0]->{'ndbcluster'} )
       {
+	# Cluster is not started
+
+	# Call ndbcluster_start to check if test case needs cluster
+	# Start it if not already started
 	$master->[0]->{'ndbcluster'}= ndbcluster_start($tinfo->{'ndb_test'});
-        if ( $master->[0]->{'ndbcluster'} )
-        {
-          report_failure_and_restart($tinfo);
-          return;
-        }
+	if ( $master->[0]->{'ndbcluster'} )
+	{
+	  report_failure_and_restart($tinfo);
+	  return;
+	}
       }
       if ( ! $master->[0]->{'pid'} )
       {
@@ -2033,6 +2040,7 @@
       }
       if ( $using_ndbcluster_master and ! $master->[1]->{'pid'} )
       {
+	# Test needs cluster, start an extra mysqld connected to cluster
         mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
         $master->[1]->{'pid'}=
           mysqld_start('master',1,$tinfo->{'master_opt'},[],
@@ -2355,15 +2363,15 @@
       mtr_add_arg($args, "%s--skip-innodb", $prefix);
     }
 
-    if ( $opt_skip_ndbcluster )
+    if ( $opt_skip_ndbcluster || !$using_ndbcluster)
     {
       mtr_add_arg($args, "%s--skip-ndbcluster", $prefix);
     }
-    if ( $using_ndbcluster )
+    else
     {
       mtr_add_arg($args, "%s--ndbcluster", $prefix);
       mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
-                  $opt_ndbconnectstring);
+		  $opt_ndbconnectstring);
       mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
     }
   }
@@ -2548,6 +2556,7 @@
   my $extra_opt=         shift;
   my $slave_master_info= shift;
   my $using_ndbcluster=  shift;
+
 
   my $args;                             # Arg vector
   my $exe;

--- 1.178/client/mysqltest.c	2006-02-02 12:25:41 +01:00
+++ 1.179/client/mysqltest.c	2006-02-09 13:28:00 +01:00
@@ -2500,19 +2500,8 @@
     *create_conn= 0;
     goto err;
   }
-  else
-  {
-    handle_no_error(q);
 
-    /*
-      Fail if there was no error but we expected it.
-      We also don't want to have connection in this case.
-    */
-    mysql_close(con);
-    *create_conn= 0;
-    error= 1;
-    goto err;
-  }
+  handle_no_error(q);
 
   /*
    TODO: change this to 0 in future versions, but the 'kill' test relies on
Thread
bk commit into 5.1 tree (msvensson:1.2097)msvensson9 Feb