List:Commits« Previous MessageNext Message »
From:Jim Winstead Date:May 7 2009 10:11pm
Subject:bzr commit into mysql-5.1-bugteam branch (jimw:2889) Bug#32457
View as plain text  
#At file:///Users/jimw/my/mysql-5.1/ based on revid:jimw@stripped

 2889 Jim Winstead	2009-05-07
      mysqladmin kill can't handle 64-bit thread IDs. (Bug #32457)
      modified:
        client/mysqladmin.cc

=== modified file 'client/mysqladmin.cc'
--- a/client/mysqladmin.cc	2009-05-07 17:51:55 +0000
+++ b/client/mysqladmin.cc	2009-05-07 20:09:53 +0000
@@ -679,10 +679,16 @@ static int execute_commands(MYSQL *mysql
 	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,',')))

Thread
bzr commit into mysql-5.1-bugteam branch (jimw:2889) Bug#32457Jim Winstead7 May