summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2011-04-11 17:03:32 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2011-04-11 17:03:32 +0300
commit460a7197bb0bda8401f947e30d6aec2b4acb9fb3 (patch)
treeb851fa825337e1df319fa715979f0d3387378863 /client
parent3dc70ced6f3a36c3a8a161d0040f389680cc6263 (diff)
parent12fbe05c6a31a7958a4a1cae748477027fffa51f (diff)
downloadmariadb-git-460a7197bb0bda8401f947e30d6aec2b4acb9fb3.tar.gz
Merge mysql-5.1-innodb to mysql-5.5-innodb.
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);
}