diff --git a/src/MySQLdb/_mysql.c b/src/MySQLdb/_mysql.c index 8ea32e0..c334db6 100644 --- a/src/MySQLdb/_mysql.c +++ b/src/MySQLdb/_mysql.c @@ -1797,8 +1797,9 @@ _mysql_ConnectionObject_kill( char query[50]; if (!PyArg_ParseTuple(args, "k:kill", &pid)) return NULL; check_connection(self); + snprintf(query, 50, "KILL %lu", pid); Py_BEGIN_ALLOW_THREADS - r = mysql_query(&(self->connection), snprintf(query, 50, "KILL %d", pid)); + r = mysql_query(&(self->connection), query); Py_END_ALLOW_THREADS if (r) return _mysql_Exception(self); Py_RETURN_NONE;