List:Commits« Previous MessageNext Message »
From:monty Date:November 23 2006 4:39pm
Subject:bk commit into 5.0 tree (monty:1.2312)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty 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, 2006-11-23 18:39:10+02:00, monty@stripped +2 -0
  Added option --mtr-build-thread to mysql-test-run.pl
  Load shared libraries from zlib (fixed that mysql-test-run.pl didn't work on some Solaris boxes)
  Added connect timeout to test to make im_daemon_life_cycle more predictable

  mysql-test/mysql-test-run.pl@stripped, 2006-11-23 18:39:07+02:00, monty@stripped +66 -37
    Added option --mtr-build-thread
    Load shared libraries from zlib (fixed that mysql-test-run.pl didn't work on some Solaris boxes)
    

  mysql-test/t/wait_for_socket.sh@stripped, 2006-11-23 18:39:08+02:00, monty@stripped +1 -1
    Added connect timeout (to make test predictable)

# 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:	monty
# Host:	nosik.monty.fi
# Root:	/home/my/mysql-5.0

--- 1.1/mysql-test/t/wait_for_socket.sh	2006-11-23 18:39:14 +02:00
+++ 1.2/mysql-test/t/wait_for_socket.sh	2006-11-23 18:39:14 +02:00
@@ -33,7 +33,7 @@
 
 ###########################################################################
 
-client_args="--silent --socket=$socket_path "
+client_args="--silent --socket=$socket_path --connect_timeout=1 "
 
 [ -n "$username" ] && client_args="$client_args --user=$username "
 [ -n "$password" ] && client_args="$client_args --password=$password "

--- 1.153/mysql-test/mysql-test-run.pl	2006-11-23 18:39:14 +02:00
+++ 1.154/mysql-test/mysql-test-run.pl	2006-11-23 18:39:14 +02:00
@@ -199,6 +199,7 @@
 our $opt_manual_gdb;
 our $opt_manual_ddd;
 our $opt_manual_debug;
+our $opt_mtr_build_thread=0;
 our $opt_debugger;
 our $opt_client_debugger;
 
@@ -213,6 +214,11 @@
 
 our $instance_manager;
 
+our $opt_master_myport;
+our $opt_slave_myport;
+our $im_port;
+our $im_mysqld1_port;
+our $im_mysqld2_port;
 our $opt_ndbcluster_port;
 our $opt_ndbconnectstring;
 our $opt_ndbcluster_port_slave;
@@ -313,6 +319,7 @@
 sub main ();
 sub initial_setup ();
 sub command_line_setup ();
+sub set_mtr_build_thread_ports($);
 sub datadir_setup ();
 sub executable_setup ();
 sub environment_setup ();
@@ -455,45 +462,17 @@
   $opt_suite=        "main";    # Special default suite
   my $opt_comment;
 
-  my $opt_master_myport=       9306;
-  my $opt_slave_myport=        9308;
+  $opt_master_myport=          9306;
+  $opt_slave_myport=           9308;
   $opt_ndbcluster_port=        9310;
   $opt_ndbcluster_port_slave=  9311;
-  my $im_port=                 9312;
-  my $im_mysqld1_port=         9313;
-  my $im_mysqld2_port=         9314;
+  $im_port=                    9312;
+  $im_mysqld1_port=            9313;
+  $im_mysqld2_port=            9314;
 
-  #
-  # To make it easier for different devs to work on the same host,
-  # an environment variable can be used to control all ports. A small
-  # number is to be used, 0 - 16 or similar.
-  #
-  # Note the MASTER_MYPORT has to be set the same in all 4.x and 5.x
-  # versions of this script, else a 4.0 test run might conflict with a
-  # 5.1 test run, even if different MTR_BUILD_THREAD is used. This means
-  # all port numbers might not be used in this version of the script.
-  #
-  # Also note the limiteation of ports we are allowed to hand out. This
-  # differs between operating systems and configuration, see
-  # http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html
-  # But a fairly safe range seems to be 5001 - 32767
   if ( $ENV{'MTR_BUILD_THREAD'} )
   {
-    # Up to two masters, up to three slaves
-    $opt_master_myport=         $ENV{'MTR_BUILD_THREAD'} * 10 + 10000; # and 1
-    $opt_slave_myport=          $opt_master_myport + 2;  # and 3 4
-    $opt_ndbcluster_port=       $opt_master_myport + 5;
-    $opt_ndbcluster_port_slave= $opt_master_myport + 6;
-    $im_port=                   $opt_master_myport + 7;
-    $im_mysqld1_port=           $opt_master_myport + 8;
-    $im_mysqld2_port=           $opt_master_myport + 9;
-  }
-
-  if ( $opt_master_myport < 5001 or $opt_master_myport + 10 >= 32767 )
-  {
-    mtr_error("MTR_BUILD_THREAD number results in a port",
-              "outside 5001 - 32767",
-              "($opt_master_myport - $opt_master_myport + 10)");
+    set_mtr_build_thread_ports($ENV{'MTR_BUILD_THREAD'});
   }
 
   # This is needed for test log evaluation in "gen-build-status-page"
@@ -545,6 +524,7 @@
              'im-port=i'                => \$im_port, # Instance Manager port.
              'im-mysqld1-port=i'        => \$im_mysqld1_port, # Port of mysqld, controlled by IM
              'im-mysqld2-port=i'        => \$im_mysqld2_port, # Port of mysqld, controlled by IM
+	     'mtr-build-thread=i'       => \$opt_mtr_build_thread,
 
              # Test case authoring
              'record'                   => \$opt_record,
@@ -627,6 +607,15 @@
 
   $glob_scriptname=  basename($0);
 
+  if ($opt_mtr_build_thread != 0)
+  {
+    set_mtr_build_thread_ports($opt_mtr_build_thread)
+  }
+  elsif ($ENV{'MTR_BUILD_THREAD'})
+  {
+    $opt_mtr_build_thread= $ENV{'MTR_BUILD_THREAD'};
+  }
+
   # We require that we are in the "mysql-test" directory
   # to run mysql-test-run
   if (! -f $glob_scriptname)
@@ -775,7 +764,7 @@
       {
 	mtr_report("Using tmpfs in $fs");
 	$opt_mem= "$fs/var";
-	$opt_mem .= $ENV{'MTR_BUILD_THREAD'} if $ENV{'MTR_BUILD_THREAD'};
+	$opt_mem .= $opt_mtr_build_thread if $opt_mtr_build_thread;
 	last;
       }
     }
@@ -1230,6 +1219,43 @@
   $path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
 }
 
+#
+# To make it easier for different devs to work on the same host,
+# an environment variable can be used to control all ports. A small
+# number is to be used, 0 - 16 or similar.
+#
+# Note the MASTER_MYPORT has to be set the same in all 4.x and 5.x
+# versions of this script, else a 4.0 test run might conflict with a
+# 5.1 test run, even if different MTR_BUILD_THREAD is used. This means
+# all port numbers might not be used in this version of the script.
+#
+# Also note the limitation of ports we are allowed to hand out. This
+# differs between operating systems and configuration, see
+# http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html
+# But a fairly safe range seems to be 5001 - 32767
+#
+
+sub set_mtr_build_thread_ports() {
+  my $mtr_build_thread= shift;
+
+  # Up to two masters, up to three slaves
+  $opt_master_myport=         $mtr_build_thread * 10 + 10000; # and 1
+  $opt_slave_myport=          $opt_master_myport + 2;  # and 3 4
+  $opt_ndbcluster_port=       $opt_master_myport + 5;
+  $opt_ndbcluster_port_slave= $opt_master_myport + 6;
+  $im_port=                   $opt_master_myport + 7;
+  $im_mysqld1_port=           $opt_master_myport + 8;
+  $im_mysqld2_port=           $opt_master_myport + 9;
+
+  if ( $opt_master_myport < 5001 or $opt_master_myport + 10 >= 32767 )
+  {
+    mtr_error("MTR_BUILD_THREAD number results in a port",
+              "outside 5001 - 32767",
+              "($opt_master_myport - $opt_master_myport + 10)");
+  }
+}
+
+
 sub datadir_setup () {
 
   # Make a list of all data_dirs
@@ -1576,7 +1602,8 @@
   if ( $opt_source_dist )
   {
     push(@ld_library_paths, "$glob_basedir/libmysql/.libs/",
-                            "$glob_basedir/libmysql_r/.libs/");
+                            "$glob_basedir/libmysql_r/.libs/",
+                            "$glob_basedir/zlib.libs/");
   }
   else
   {
@@ -1647,7 +1674,7 @@
   $ENV{'IM_PATH_SOCK'}=       $instance_manager->{path_sock};
   $ENV{'IM_USERNAME'}=        $instance_manager->{admin_login};
   $ENV{'IM_PASSWORD'}=        $instance_manager->{admin_password};
-  $ENV{MTR_BUILD_THREAD}= 0 unless $ENV{MTR_BUILD_THREAD}; # Set if not set
+  $ENV{MTR_BUILD_THREAD}=      $opt_mtr_build_thread;
 
   $ENV{'EXE_MYSQL'}=          $exe_mysql;
 
@@ -4754,6 +4781,8 @@
   slave_port=PORT       Specify the port number used by the first slave
   ndbcluster-port=PORT  Specify the port number used by cluster
   ndbcluster-port-slave=PORT  Specify the port number used by slave cluster
+  mtr-build-thread=#    Specify unique collection of ports. Can also be set by
+                        setting the environment variable MTR_BUILD_THREAD.
 
 Options for test case authoring
 
Thread
bk commit into 5.0 tree (monty:1.2312)monty23 Nov