mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1
This commit is contained in:
commit
82840877e9
1 changed files with 5 additions and 4 deletions
|
@ -1550,19 +1550,20 @@ int do_sleep(struct st_query *query, my_bool real_sleep)
|
|||
char *p= query->first_argument;
|
||||
char *sleep_start, *sleep_end= query->end;
|
||||
double sleep_val;
|
||||
char *cmd = (real_sleep ? "real_sleep" : "sleep");
|
||||
|
||||
while (my_isspace(charset_info, *p))
|
||||
p++;
|
||||
if (!*p)
|
||||
die("Missing argument to %s", cmd);
|
||||
die("Missing argument to %.*s", query->first_word_len, query->query);
|
||||
sleep_start= p;
|
||||
/* Check that arg starts with a digit, not handled by my_strtod */
|
||||
if (!my_isdigit(charset_info, *sleep_start))
|
||||
die("Invalid argument to %s \"%s\"", cmd, query->first_argument);
|
||||
die("Invalid argument to %.*s \"%s\"", query->first_word_len, query->query,
|
||||
query->first_argument);
|
||||
sleep_val= my_strtod(sleep_start, &sleep_end, &error);
|
||||
if (error)
|
||||
die("Invalid argument to %s \"%s\"", cmd, query->first_argument);
|
||||
die("Invalid argument to %.*s \"%s\"", query->first_word_len, query->query,
|
||||
query->first_argument);
|
||||
|
||||
/* Fixed sleep time selected by --sleep option */
|
||||
if (opt_sleep && !real_sleep)
|
||||
|
|
Loading…
Reference in a new issue