diff options
author | Jim Winstead <jimw@mysql.com> | 2009-05-07 13:09:53 -0700 |
---|---|---|
committer | Jim Winstead <jimw@mysql.com> | 2009-05-07 13:09:53 -0700 |
commit | 9345dbba6fdb3ef21b72db03ce38ca832154c235 (patch) | |
tree | 4f70d7eb3458e3726657be150ca0edc4bf277985 /client | |
parent | 038be08a1b8f29479e6ff993328692d0875650c2 (diff) | |
download | mariadb-git-9345dbba6fdb3ef21b72db03ce38ca832154c235.tar.gz |
mysqladmin kill can't handle 64-bit thread IDs. (Bug #32457)
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqladmin.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 94d3d92e03a..9865b67bb3b 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -679,10 +679,16 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) pos=argv[1]; for (;;) { - if (mysql_kill(mysql,(ulong) atol(pos))) + /* We don't use mysql_kill(), since it only handles 32-bit IDs. */ + char buff[26], *out; /* "KILL " + max 20 digs + NUL */ + out= strxmov(buff, "KILL ", NullS); + ullstr(strtoull(pos, NULL, 0), out); + + if (mysql_query(mysql, buff)) { - my_printf_error(0, "kill failed on %ld; error: '%s'", error_flags, - atol(pos), mysql_error(mysql)); + /* out still points to just the number */ + my_printf_error(0, "kill failed on %s; error: '%s'", error_flags, + out, mysql_error(mysql)); error=1; } if (!(pos=strchr(pos,','))) |