summaryrefslogtreecommitdiff
path: root/client/mysqltest.c
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2006-05-01 11:38:15 -0700
committerunknown <jimw@mysql.com>2006-05-01 11:38:15 -0700
commit839a5dea8672091fd5a96cef5dff8934d938884b (patch)
treee40a050be0bf936cff10d68680df4bf5d7f5cbea /client/mysqltest.c
parentae75af8cb75ccd088121e1fe3b01a0090a11808b (diff)
parent71b3a5aa3549219f4992176483244664f9a72a0f (diff)
downloadmariadb-git-839a5dea8672091fd5a96cef5dff8934d938884b.tar.gz
Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into mysql.com:/home/jimw/my/mysql-5.1-clean BitKeeper/etc/ignore: auto-union client/mysqltest.c: Auto merged include/config-win.h: Auto merged sql/repl_failsafe.cc: Auto merged
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r--client/mysqltest.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index b630de8be4e..21ca1d6e3a1 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="./";
const char *opt_include= 0;
@@ -1880,11 +1880,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;
}
@@ -3310,7 +3311,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,