List:Commits« Previous MessageNext Message »
From:msvensson Date:October 31 2006 7:08pm
Subject:bk commit into 5.0 tree (msvensson:1.2333)
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, 2006-10-31 19:08:30+01:00, msvensson@shellback.(none) +5 -0
  Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint
  into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
  MERGE: 1.1616.2697.91

  client/mysqltest.c@stripped, 2006-10-31 19:04:52+01:00, msvensson@shellback.(none) +0 -0
    Auto merged
    MERGE: 1.92.21.26

  mysql-test/lib/mtr_io.pl@stripped, 2006-10-31 19:04:52+01:00, msvensson@shellback.(none) +5
-12
    Auto merged
    MERGE: 1.3.1.3

  mysql-test/lib/mtr_process.pl@stripped, 2006-10-31 19:04:52+01:00,
msvensson@shellback.(none) +0 -1
    Auto merged
    MERGE: 1.15.1.11

  mysql-test/mysql-test-run.pl@stripped, 2006-10-31 19:04:52+01:00,
msvensson@shellback.(none) +0 -0
    Auto merged
    MERGE: 1.8.9.77

  mysql-test/t/rename.test@stripped, 2006-10-31 19:08:28+01:00, msvensson@shellback.(none) +3
-3
    Manual mereg
    MERGE: 1.11.1.1

# 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:	shellback.(none)
# Root:	/home/msvensson/mysql/mysql-5.0-maint/RESYNC

--- 1.6/mysql-test/lib/mtr_io.pl	2006-10-31 19:08:37 +01:00
+++ 1.7/mysql-test/lib/mtr_io.pl	2006-10-31 19:08:37 +01:00
@@ -37,18 +37,16 @@
     open(FILE, '<', $pid_file_path)
       or mtr_error("can't open file \"$pid_file_path\": $!");
 
+    # Read pid number from file
     my $pid= <FILE>;
-
-    chomp($pid) if defined $pid;
-
     close FILE;
 
-    return $pid if defined $pid && $pid ne '';
+    return $pid if $pid=~ /^(\d+)/;
 
-    mtr_debug("Pid file '$pid_file_path' is empty. " .
-              "Sleeping $timeout second(s)...");
+    mtr_debug("Pid file '$pid_file_path' does not yet contain pid number.\n" .
+              "Sleeping $timeout second(s) more...");
 
-    sleep(1);
+    sleep($timeout);
   }
 
   mtr_error("Pid file '$pid_file_path' is corrupted. " .

--- 1.41/mysql-test/lib/mtr_process.pl	2006-10-31 19:08:37 +01:00
+++ 1.42/mysql-test/lib/mtr_process.pl	2006-10-31 19:08:37 +01:00
@@ -438,25 +438,35 @@
 
     while ( my $elem= readdir(RUNDIR) )
     {
-      my $pidfile= "$rundir/$elem";
-
-      if ( -f $pidfile )
+      # Only read pid from files that end with .pid
+      if ( $elem =~ /.*[.]pid$/)
       {
-        mtr_debug("Processing PID file: '$pidfile'...");
 
-        my $pid= mtr_get_pid_from_file($pidfile);
+	my $pidfile= "$rundir/$elem";
+
+	if ( -f $pidfile )
+	{
+	  mtr_debug("Processing PID file: '$pidfile'...");
 
-        mtr_debug("Got pid: $pid from file '$pidfile'");
+	  my $pid= mtr_get_pid_from_file($pidfile);
 
-        if ( $::glob_cygwin_perl or kill(0, $pid) )
-        {
-          mtr_debug("There is process with pid $pid -- scheduling for kill.");
-          push(@pids, $pid);            # We know (cygwin guess) it exists
-        }
-        else
-        {
-          mtr_debug("There is no process with pid $pid -- skipping.");
-        }
+	  mtr_debug("Got pid: $pid from file '$pidfile'");
+
+	  if ( $::glob_cygwin_perl or kill(0, $pid) )
+	  {
+	    mtr_debug("There is process with pid $pid -- scheduling for kill.");
+	    push(@pids, $pid);            # We know (cygwin guess) it exists
+	  }
+	  else
+	  {
+	    mtr_debug("There is no process with pid $pid -- skipping.");
+	  }
+	}
+      }
+      else
+      {
+	mtr_warning("Found non pid file $elem in $rundir");
+	next;
       }
     }
     closedir(RUNDIR);

--- 1.138/mysql-test/mysql-test-run.pl	2006-10-31 19:08:37 +01:00
+++ 1.139/mysql-test/mysql-test-run.pl	2006-10-31 19:08:37 +01:00
@@ -1801,14 +1801,16 @@
   # ----------------------------------------------------
   # Setup env so childs can execute mysql_fix_system_tables
   # ----------------------------------------------------
-  my $cmdline_mysql_fix_system_tables=
-    "$exe_mysql_fix_system_tables --no-defaults --host=localhost " .
-    "--user=root --password= " .
-    "--basedir=$glob_basedir --bindir=$path_client_bindir --verbose " .
-    "--port=$master->[0]->{'port'} " .
-    "--socket=$master->[0]->{'path_sock'}";
-
-  $ENV{'MYSQL_FIX_SYSTEM_TABLES'}=  $cmdline_mysql_fix_system_tables;
+  if ( ! $glob_win32 )
+  {
+    my $cmdline_mysql_fix_system_tables=
+      "$exe_mysql_fix_system_tables --no-defaults --host=localhost " .
+      "--user=root --password= " .
+      "--basedir=$glob_basedir --bindir=$path_client_bindir --verbose " .
+      "--port=$master->[0]->{'port'} " .
+      "--socket=$master->[0]->{'path_sock'}";
+    $ENV{'MYSQL_FIX_SYSTEM_TABLES'}=  $cmdline_mysql_fix_system_tables;
+  }
 
   # ----------------------------------------------------
   # Setup env so childs can execute my_print_defaults

--- 1.13/mysql-test/t/rename.test	2006-10-31 19:08:37 +01:00
+++ 1.14/mysql-test/t/rename.test	2006-10-31 19:08:37 +01:00
@@ -43,8 +43,8 @@
 drop table if exists t1,t2,t3,t4;
 
 #
-# Test-case for Bug #2397 RENAME TABLES is not blocked by 
-#                                  FLUSH TABLES WITH READ LOCK
+# Bug #2397 RENAME TABLES is not blocked by
+# FLUSH TABLES WITH READ LOCK
 #
 
 connect (con1,localhost,root,,);
@@ -58,12 +58,17 @@
 connection con1;
 send RENAME TABLE t1 TO t2, t3 to t4;
 connection con2;
-sleep 1;
 show tables;
 UNLOCK TABLES;
 connection con1;
 reap;
 connection con2;
+
+# Wait for the the tables to be renamed
+# i.e the query below succeds
+let $query= select * from t2, t4;
+source include/wait_for_query_to_suceed.inc;
+
 show tables;
 
 drop table t2, t4;

--- 1.254/client/mysqltest.c	2006-10-31 19:08:37 +01:00
+++ 1.255/client/mysqltest.c	2006-10-31 19:08:37 +01:00
@@ -1409,7 +1409,7 @@
 
 void do_source(struct st_command *command)
 {
-  DYNAMIC_STRING ds_filename;
+  static DYNAMIC_STRING ds_filename;
   const struct command_arg source_args[] = {
     "filename", ARG_STRING, TRUE, &ds_filename, "File to source"
   };
@@ -1697,7 +1697,7 @@
 void do_remove_file(struct st_command *command)
 {
   int error;
-  DYNAMIC_STRING ds_filename;
+  static DYNAMIC_STRING ds_filename;
   const struct command_arg rm_args[] = {
     "filename", ARG_STRING, TRUE, &ds_filename, "File to delete"
   };
@@ -1730,8 +1730,8 @@
 void do_copy_file(struct st_command *command)
 {
   int error;
-  DYNAMIC_STRING ds_from_file;
-  DYNAMIC_STRING ds_to_file;
+  static DYNAMIC_STRING ds_from_file;
+  static DYNAMIC_STRING ds_to_file;
   const struct command_arg copy_file_args[] = {
     "from_file", ARG_STRING, TRUE, &ds_from_file, "Filename to copy from",
     "to_file", ARG_STRING, TRUE, &ds_to_file, "Filename to copy to"
@@ -1766,7 +1766,7 @@
 void do_file_exist(struct st_command *command)
 {
   int error;
-  DYNAMIC_STRING ds_filename;
+  static DYNAMIC_STRING ds_filename;
   const struct command_arg file_exist_args[] = {
     "filename", ARG_STRING, TRUE, &ds_filename, "File to check if it exist"
   };
@@ -1873,9 +1873,9 @@
 
 void do_write_file(struct st_command *command)
 {
-  DYNAMIC_STRING ds_content;
-  DYNAMIC_STRING ds_filename;
-  DYNAMIC_STRING ds_delimiter;
+  static DYNAMIC_STRING ds_content;
+  static DYNAMIC_STRING ds_filename;
+  static DYNAMIC_STRING ds_delimiter;
   const struct command_arg write_file_args[] = {
     "filename", ARG_STRING, TRUE, &ds_filename, "File to write to",
     "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until"
@@ -1927,8 +1927,8 @@
   int error;
   char buf[FN_REFLEN];
   FILE *res_file;
-  DYNAMIC_STRING ds_script;
-  DYNAMIC_STRING ds_delimiter;
+  static DYNAMIC_STRING ds_script;
+  static DYNAMIC_STRING ds_delimiter;
   const struct command_arg perl_args[] = {
     "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until"
   };
@@ -2985,14 +2985,14 @@
   bool con_ssl= 0, con_compress= 0;
   char *ptr;
 
-  DYNAMIC_STRING ds_connection_name;
-  DYNAMIC_STRING ds_host;
-  DYNAMIC_STRING ds_user;
-  DYNAMIC_STRING ds_password;
-  DYNAMIC_STRING ds_database;
-  DYNAMIC_STRING ds_port;
-  DYNAMIC_STRING ds_sock;
-  DYNAMIC_STRING ds_options;
+  static DYNAMIC_STRING ds_connection_name;
+  static DYNAMIC_STRING ds_host;
+  static DYNAMIC_STRING ds_user;
+  static DYNAMIC_STRING ds_password;
+  static DYNAMIC_STRING ds_database;
+  static DYNAMIC_STRING ds_port;
+  static DYNAMIC_STRING ds_sock;
+  static DYNAMIC_STRING ds_options;
   const struct command_arg connect_args[] = {
     "connection name", ARG_STRING, TRUE, &ds_connection_name,
     "Name of the connection",
Thread
bk commit into 5.0 tree (msvensson:1.2333)msvensson31 Oct