fix build issue introduced in 2.2.2 (#696)

This commit is contained in:
Inada Naoki
2024-02-04 21:43:11 +09:00
committed by GitHub
parent 7c199a90f8
commit b34f8ef174

View File

@ -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;