List:Commits« Previous MessageNext Message »
From:msvensson Date:February 28 2007 2:04pm
Subject:bk commit into 5.0 tree (msvensson:1.2451)
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-02-28 15:04:20+01:00, msvensson@stripped +7 -0
  Merge pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint
  into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint-bug20166
  MERGE: 1.1616.2877.68

  BitKeeper/deleted/.del-init_db.sql@stripped, 2007-02-28 15:04:18+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.2.1.1

  BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8@stripped, 2007-02-28 15:04:18+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.4.1.2

  BitKeeper/etc/ignore@stripped, 2007-02-28 15:04:16+01:00, msvensson@stripped +2 -2
    auto-union
    MERGE: 1.153.1.88

  client/mysqltest.c@stripped, 2007-02-28 15:04:18+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.92.21.50

  mysql-test/Makefile.am@stripped, 2007-02-28 15:04:18+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.39.1.21

  mysql-test/lib/mtr_process.pl@stripped, 2007-02-28 15:04:18+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.15.1.18

  mysql-test/mysql-test-run.pl@stripped, 2007-02-28 15:04:18+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.8.20.5

# 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:	pilot.blaudden
# Root:	/home/msvensson/mysql/mysql-5.0-maint-bug20166/RESYNC

--- 1.49/mysql-test/lib/mtr_process.pl	2007-01-11 15:40:01 +01:00
+++ 1.50/mysql-test/lib/mtr_process.pl	2007-02-28 15:04:18 +01:00
@@ -22,7 +22,7 @@ use Socket;
 use Errno;
 use strict;
 
-use POSIX 'WNOHANG';
+use POSIX qw(WNOHANG SIGHUP);
 
 sub mtr_run ($$$$$$;$);
 sub mtr_spawn ($$$$$$;$);
@@ -139,19 +139,18 @@ sub spawn_impl ($$$$$$$$) {
     {
       if ( $! == $!{EAGAIN} )           # See "perldoc Errno"
       {
-        mtr_debug("Got EAGAIN from fork(), sleep 1 second and redo");
+        mtr_warning("Got EAGAIN from fork(), sleep 1 second and redo");
         sleep(1);
         redo FORK;
       }
-      else
-      {
-        mtr_error("$path ($pid) can't be forked");
-      }
+
+      mtr_error("$path ($pid) can't be forked, error: $!");
+
     }
 
     if ( $pid )
     {
-      spawn_parent_impl($pid,$mode,$path);
+      return spawn_parent_impl($pid,$mode,$path);
     }
     else
     {
@@ -216,8 +215,11 @@ sub spawn_impl ($$$$$$$$) {
       {
         mtr_child_error("failed to execute \"$path\": $!");
       }
+      mtr_error("Should never come here 1!");
     }
+    mtr_error("Should never come here 2!");
   }
+  mtr_error("Should never come here 3!");
 }
 
 
@@ -230,12 +232,21 @@ sub spawn_parent_impl {
   {
     if ( $mode eq 'run' )
     {
-      # Simple run of command, we wait for it to return
+      # Simple run of command, wait blocking for it to return
       my $ret_pid= waitpid($pid,0);
       if ( $ret_pid != $pid )
       {
-        mtr_error("waitpid($pid, 0) returned $ret_pid " .
-		  "when waiting for '$path'");
+	# The "simple" waitpid has failed, print debug info
+	# and try to handle the error
+        mtr_warning("waitpid($pid, 0) returned $ret_pid " .
+		    "when waiting for '$path', error: '$!'");
+	if ( $ret_pid == -1 )
+	{
+	  # waitpid returned -1, that would indicate the process
+	  # no longer exist and waitpid couldn't wait for it.
+	  return 1;
+	}
+	mtr_error("Error handling failed");
       }
 
       return mtr_process_exit_status($?);
@@ -1109,12 +1120,6 @@ sub mtr_kill_processes ($) {
 #
 ##############################################################################
 
-# FIXME something is wrong, we sometimes terminate with "Hangup" written
-# to tty, and no STDERR output telling us why.
-
-# FIXME for some reason, setting HUP to 'IGNORE' will cause exit() to
-# write out "Hangup", and maybe loose some output. We insert a sleep...
-
 sub mtr_exit ($) {
   my $code= shift;
   mtr_timer_stop_all($::glob_timers);
@@ -1126,7 +1131,7 @@ sub mtr_exit ($) {
   # set ourselves as the group leader at startup (with
   # POSIX::setpgrp(0,0)), but then care must be needed to always do
   # proper child process cleanup.
-  kill('HUP', -$$) if !$::glob_win32_perl and $$ == getpgrp();
+  POSIX::kill(SIGHUP, -$$) if !$::glob_win32_perl and $$ == getpgrp();
 
   exit($code);
 }

--- 1.202/mysql-test/mysql-test-run.pl	2007-02-28 14:26:57 +01:00
+++ 1.203/mysql-test/mysql-test-run.pl	2007-02-28 15:04:18 +01:00
@@ -2121,6 +2121,16 @@ sub remove_stale_vardir () {
       mtr_verbose("Removing $opt_vardir/");
       rmtree("$opt_vardir/");
     }
+
+    if ( $opt_mem )
+    {
+      # A symlink from var/ to $opt_mem will be set up
+      # remove the $opt_mem dir to assure the symlink
+      # won't point at an old directory
+      mtr_verbose("Removing $opt_mem");
+      rmtree($opt_mem);
+    }
+
   }
   else
   {

--- 1.283/client/mysqltest.c	2007-02-20 18:21:12 +01:00
+++ 1.284/client/mysqltest.c	2007-02-28 15:04:18 +01:00
@@ -60,6 +60,11 @@
 # endif
 #endif
 
+/* Use cygwin for --exec and --system before 5.0 */
+#if MYSQL_VERSION_ID < 50000
+#define USE_CYGWIN
+#endif
+
 #define MAX_VAR_NAME_LENGTH    256
 #define MAX_COLUMNS            256
 #define MAX_EMBEDDED_SERVER_ARGS 64
@@ -5356,8 +5361,9 @@ void run_query_stmt(MYSQL *mysql, struct
   /*
     If we got here the statement succeeded and was expected to do so,
     get data. Note that this can still give errors found during execution!
+    Store the result of the query if if will return any fields
   */
-  if (mysql_stmt_store_result(stmt))
+  if (mysql_stmt_field_count(stmt) && mysql_stmt_store_result(stmt))
   {
     handle_error(command, mysql_stmt_errno(stmt),
                  mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);

--- 1.242/BitKeeper/etc/ignore	2007-02-26 11:49:23 +01:00
+++ 1.243/BitKeeper/etc/ignore	2007-02-28 15:04:16 +01:00
@@ -696,6 +696,7 @@ mysql-test/*.ds?
 mysql-test/*.vcproj
 mysql-test/gmon.out
 mysql-test/install_test_db
+mysql-test/lib/init_db.sql
 mysql-test/mtr
 mysql-test/mysql-test-run
 mysql-test/mysql-test-run-shell
@@ -1098,6 +1099,7 @@ scripts/mysql_explain_log
 scripts/mysql_find_rows
 scripts/mysql_fix_extensions
 scripts/mysql_fix_privilege_tables
+scripts/mysql_fix_privilege_tables.sql
 scripts/mysql_install_db
 scripts/mysql_secure_installation
 scripts/mysql_setpermission
@@ -1335,4 +1337,3 @@ win/vs71cache.txt
 win/vs8cache.txt
 zlib/*.ds?
 zlib/*.vcproj
-scripts/mysql_fix_privilege_tables.sql

--- 1.86/mysql-test/Makefile.am	2007-02-26 11:49:23 +01:00
+++ 1.87/mysql-test/Makefile.am	2007-02-28 15:04:18 +01:00
@@ -34,7 +34,7 @@ benchdir_root=		$(prefix)
 testdir =	        $(benchdir_root)/mysql-test
 EXTRA_SCRIPTS = 	mysql-test-run-shell.sh install_test_db.sh valgrind.supp $(PRESCRIPTS)
 EXTRA_DIST = 		$(EXTRA_SCRIPTS)
-GENSCRIPTS =		mysql-test-run-shell mysql-test-run install_test_db mtr
+GENSCRIPTS =		mysql-test-run-shell mysql-test-run install_test_db mtr lib/init_db.sql
 PRESCRIPTS =		mysql-test-run.pl
 test_SCRIPTS = 		$(GENSCRIPTS) $(PRESCRIPTS)
 test_DATA = 		std_data/client-key.pem \
@@ -122,6 +122,11 @@ mtr:
 mysql-test-run:
 	$(RM) -f mysql-test-run
 	$(LN_S) mysql-test-run.pl mysql-test-run
+
+# Build init_db.sql by executing mysql_create_system_tables
+lib/init_db.sql:
+	$(top_builddir)/scripts/mysql_create_system_tables \
+          test . \@HOSTNAME\@ > lib/init_db.sql
 
 SUFFIXES = .sh
 
Thread
bk commit into 5.0 tree (msvensson:1.2451)msvensson28 Feb