diff --git a/HISTORY.rst b/HISTORY.rst index 87bb2790..b57251c7 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,3 +1,12 @@ +====================== + What's new in 2.2.3 +====================== + +Release: 2024-02-04 + +* Fix ``Connection.kill()`` method that broken in 2.2.2. (#689) + + ====================== What's new in 2.2.2 ====================== diff --git a/src/MySQLdb/_mysql.c b/src/MySQLdb/_mysql.c index 8ea32e08..c334db66 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; diff --git a/src/MySQLdb/release.py b/src/MySQLdb/release.py index 614020dc..6bc1089f 100644 --- a/src/MySQLdb/release.py +++ b/src/MySQLdb/release.py @@ -1,3 +1,3 @@ __author__ = "Inada Naoki " -__version__ = "2.2.2" -version_info = (2, 2, 2, "final", 0) +__version__ = "2.2.3" +version_info = (2, 2, 3, "final", 0)