8000 use KILL instead of COM_KILL for MySQL 8.4 support (#1197) · PyMySQL/PyMySQL@0d4609c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d4609c

Browse files
authored
use KILL instead of COM_KILL for MySQL 8.4 support (#1197)
1 parent 046d36c commit 0d4609c

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/test.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,29 @@ jobs:
1919
matrix:
2020
include:
2121
- db: "mariadb:10.4"
22-
py: "3.8"
22+
py: "3.13"
2323

2424
- db: "mariadb:10.5"
25-
py: "3.8"
25+
py: "3.11"
2626

2727
- db: "mariadb:10.6"
28-
py: "3.11"
28+
py: "3.10"
2929

3030
- db: "mariadb:10.6"
31-
py: "3.13"
31+
py: "3.9"
3232

3333
- db: "mariadb:lts"
34-
py: "3.9"
34+
py: "3.8"
3535

3636
- db: "mysql:5.7"
3737
py: "pypy-3.10"
3838

3939
- db: "mysql:8.0"
40-
py: "3.8"
40+
py: "3.13"
4141
mysql_auth: true
4242

43-
- db: "mysql:8.0"
44-
py: "3.10"
43+
- db: "mysql:8.4"
44+
py: "3.8"
4545
mysql_auth: true
4646

4747
services:

pymysql/connections.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,9 @@ def affected_rows(self):
576576
return self._affected_rows
577577

578578
def kill(self, thread_id):
579-
arg = struct.pack("<I", thread_id)
580-
self._execute_command(COMMAND.COM_PROCESS_KILL, arg)
581-
return self._read_ok_packet()
579+
if not isinstance(thread_id, int):
580+
raise TypeError("thread_id must be an integer")
581+
self.query(f"KILL {thread_id:d}")
582582

583583
def ping(self, reconnect=True):
584584
"""

pymysql/tests/test_charset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def test_utf8():
3030
assert uppercase_utf8 == lowercase_utf8
3131
assert mixedcase_utf8 == lowercase_utf8
3232

33+
3334
def test_case_sensitivity():
3435
lowercase_latin1 = pymysql.charset.charset_by_name("latin1")
3536
assert lowercase_latin1 is not None

0 commit comments

Comments
 (0)
10CA
0