summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2006-05-01 09:11:57 -0700
committerunknown <jimw@mysql.com>2006-05-01 09:11:57 -0700
commit64a33680174620d8326f52d1e99c203b2eb700bd (patch)
treea992d4504e45ec0f3292ac76d570191ac0f7c090 /client
parenta223550fa1e47f056522c400b541361f3701490b (diff)
parent4f9100b67cf5a8cab82f413d11d1dc7baf6859e2 (diff)
downloadmariadb-git-64a33680174620d8326f52d1e99c203b2eb700bd.tar.gz
Merge mysql.com:/home/jimw/my/mysql-5.0-18312
into mysql.com:/home/jimw/my/mysql-5.0-clean
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index e51d83270b5..ecf54e40400 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -153,7 +153,7 @@ static uint global_expected_errors;
/* ************************************************************************ */
-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 @@ int do_sleep(struct st_query *query, my_bool real_sleep)
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 @@ static struct my_option my_long_options[] =
"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,