List:Commits« Previous MessageNext Message »
From:Jim Winstead Date:April 21 2006 5:48pm
Subject:bk commit into 5.0 tree (jimw:1.2096) BUG#18312
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw 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.2096 06/04/21 10:48:53 jimw@stripped +1 -0
  Bug #18312: mysqltest: --sleep=0 doesn't disable sleep
  
    Allow --sleep=0 to be specified to mysqltest, so that sleep calls
    can be disabled.
  
    Original patch from Paul DuBois.

  client/mysqltest.c
    1.233 06/04/21 10:48:49 jimw@stripped +5 -4
    Handle --sleep=0 being specified.

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.0-18312

--- 1.232/client/mysqltest.c	2006-04-07 05:20:56 -07:00
+++ 1.233/client/mysqltest.c	2006-04-21 10:48:49 -07:00
@@ -153,7 +153,7 @@
 
 /* ************************************************************************ */
 
-static int record = 0, opt_sleep=0;
+static int record= 0, opt_sleep= -1;
 static char *db = 0, *pass=0;
 const char *user = 0, *host = 0, *unix_sock = 0, *opt_basedir="./";
 static int port = 0;
@@ -1724,11 +1724,12 @@
 		query->first_argument);
 
   /* Fixed sleep time selected by --sleep option */
-  if (opt_sleep && !real_sleep)
+  if (opt_sleep >= 0 && !real_sleep)
     sleep_val= opt_sleep;
 
   DBUG_PRINT("info", ("sleep_val: %f", sleep_val));
-  my_sleep((ulong) (sleep_val * 1000000L));
+  if (sleep_val)
+    my_sleep((ulong) (sleep_val * 1000000L));
   query->last_argument= sleep_end;
   return 0;
 }
@@ -2935,7 +2936,7 @@
    "Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG,
    0, 0, 0, 0, 0, 0},
   {"sleep", 'T', "Sleep always this many seconds on sleep commands.",
-   (gptr*) &opt_sleep, (gptr*) &opt_sleep, 0, GET_INT, REQUIRED_ARG, 0, 0, 0,
+   (gptr*) &opt_sleep, (gptr*) &opt_sleep, 0, GET_INT, REQUIRED_ARG, -1, 0, 0,
    0, 0, 0},
   {"socket", 'S', "Socket file to use for connection.",
    (gptr*) &unix_sock, (gptr*) &unix_sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
Thread
bk commit into 5.0 tree (jimw:1.2096) BUG#18312Jim Winstead21 Apr