Skip to content

Commit b34f8ef

Browse files
authored
fix build issue introduced in 2.2.2 (#696)
1 parent 7c199a9 commit b34f8ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/MySQLdb/_mysql.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1797,8 +1797,9 @@ _mysql_ConnectionObject_kill(
17971797
char query[50];
17981798
if (!PyArg_ParseTuple(args, "k:kill", &pid)) return NULL;
17991799
check_connection(self);
1800+
snprintf(query, 50, "KILL %lu", pid);
18001801
Py_BEGIN_ALLOW_THREADS
1801-
r = mysql_query(&(self->connection), snprintf(query, 50, "KILL %d", pid));
1802+
r = mysql_query(&(self->connection), query);
18021803
Py_END_ALLOW_THREADS
18031804
if (r) return _mysql_Exception(self);
18041805
Py_RETURN_NONE;

0 commit comments

Comments
 (0)