summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorVasil Dimov <vasil.dimov@oracle.com>2011-04-21 08:34:21 +0300
committerVasil Dimov <vasil.dimov@oracle.com>2011-04-21 08:34:21 +0300
commit99ed0123bd9640c32f385693309537e87ff1505a (patch)
tree319f7205dd3e45058b8f7287357b4fd237f395eb /client
parent1d75aeb9a9175e3444594aea65e2a3760ce64baf (diff)
parentf76a32c2aa2a94c294e730744af7440ad6774151 (diff)
downloadmariadb-git-99ed0123bd9640c32f385693309537e87ff1505a.tar.gz
Merge mysql-5.5-innodb -> mysql-5.5
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 4f067c54429..6f19952302c 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -4598,13 +4598,14 @@ static int my_kill(int pid, int sig)
command called command
DESCRIPTION
- shutdown [<timeout>]
+ shutdown_server [<timeout>]
*/
void do_shutdown_server(struct st_command *command)
{
- int timeout=60, pid;
+ long timeout=60;
+ int pid;
DYNAMIC_STRING ds_pidfile_name;
MYSQL* mysql = &cur_con->mysql;
static DYNAMIC_STRING ds_timeout;
@@ -4619,8 +4620,9 @@ void do_shutdown_server(struct st_command *command)
if (ds_timeout.length)
{
- timeout= atoi(ds_timeout.str);
- if (timeout == 0)
+ char* endptr;
+ timeout= strtol(ds_timeout.str, &endptr, 10);
+ if (*endptr != '\0')
die("Illegal argument for timeout: '%s'", ds_timeout.str);
}
dynstr_free(&ds_timeout);
@@ -4662,7 +4664,7 @@ void do_shutdown_server(struct st_command *command)
DBUG_PRINT("info", ("Process %d does not exist anymore", pid));
DBUG_VOID_RETURN;
}
- DBUG_PRINT("info", ("Sleeping, timeout: %d", timeout));
+ DBUG_PRINT("info", ("Sleeping, timeout: %ld", timeout));
my_sleep(1000000L);
}