List:Commits« Previous MessageNext Message »
From:msvensson Date:October 24 2007 7:04am
Subject:bk commit into 5.0 tree (msvensson:1.2555)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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@stripped, 2007-10-24 09:04:31+02:00, msvensson@shellback.(none) +2 -0
  Use default value 0 on on slave_num 

  mysql-test/lib/mtr_cases.pl@stripped, 2007-10-24 09:04:26+02:00, msvensson@shellback.(none) +1 -2
    Use default value 0 on on slave_num 

  mysql-test/mysql-test-run.pl@stripped, 2007-10-24 09:04:26+02:00, msvensson@shellback.(none) +5 -5
    Use default value 0 on on slave_num 

diff -Nrup a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
--- a/mysql-test/lib/mtr_cases.pl	2007-10-23 19:53:37 +02:00
+++ b/mysql-test/lib/mtr_cases.pl	2007-10-24 09:04:26 +02:00
@@ -380,7 +380,6 @@ sub collect_one_test_case {
   # Collect information about test case
   # ----------------------------------------------------------------------
   $tinfo->{'path'}= $path;
-  $tinfo->{'slave_num'}= 0; # Default, no slave
   $tinfo->{'master_num'}= 1; # Default, 1 master
 
   my $master_opt_file= "$testdir/$tname-master.opt";
@@ -694,7 +693,7 @@ sub collect_one_test_case {
 	$tinfo->{'comment'}= "No replication tests(--skip-rpl)";
 	return;
       }
-      # Default for rpl tests, use one slave
+      # Default for rpl tests, use one slave if not set already
       $tinfo->{'slave_num'}= $tinfo->{'slave_num'} || 1;
     }
 
diff -Nrup a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
--- a/mysql-test/mysql-test-run.pl	2007-10-23 19:58:04 +02:00
+++ b/mysql-test/mysql-test-run.pl	2007-10-24 09:04:26 +02:00
@@ -389,9 +389,10 @@ sub main () {
       $need_im||= $test->{component_id} eq 'im';
 
       # Count max number of slaves used by a test case
-      if ( $test->{slave_num} > $max_slave_num)
+      my $slave_num= $test->{slave_num} || 0;
+      if ( $slave_num > $max_slave_num)
       {
-	$max_slave_num= $test->{slave_num};
+	$max_slave_num= $slave_num;
 	mtr_error("Too many slaves") if $max_slave_num > 3;
       }
 
@@ -453,7 +454,6 @@ sub main () {
       $tinfo->{'result_file'} = undef; # Prints result
       $tinfo->{'component_id'} = 'mysqld';
       $tinfo->{'path'} = 'include/report-features.test';
-      $tinfo->{'slave_num'} = 0;
       $tinfo->{'master_opt'} = [];
       $tinfo->{'slave_opt'} = [];
       $tinfo->{'slave_mi'} = [];
@@ -4103,7 +4103,7 @@ sub run_testcase_start_servers($) {
 	 ! defined $master->[1]->{'proc'} and
 	 $tinfo->{'master_num'} > 1 )
     {
-      # Test needs cluster, start an extra mysqld connected to cluster
+      # Test needs cluster and an extra mysqld connected to cluster
 
       if ( $mysql_version_id >= 50100 )
       {
@@ -4145,7 +4145,7 @@ sub run_testcase_start_servers($) {
   # ----------------------------------------------------------------------
   # Start slaves - if needed
   # ----------------------------------------------------------------------
-  if ( $tinfo->{'slave_num'} )
+  if ( defined $tinfo->{'slave_num'} )
   {
     do_before_start_slave($tinfo);
 
Thread
bk commit into 5.0 tree (msvensson:1.2555)msvensson24 Oct