Skip to content

Commit 18315f5

Browse files
committed
BUG#35015758: COM_QUIT should not be called in the connection phase
Connector/Python will call CMD_QUIT, close the socket connection, and raise the right exception if something goes wrong in the connection phase. However, by calling CMD_QUIT in this phase, the server will interpret it as a "Bad Message" as the connection never made it to the command phase, hence CMD_QUIT is an invalid move. With this patch, CMD_QUIT is not called if something goes wrong in the connection phase. Change-Id: I845b21ed5f14911e40bdd1a106291acbafc619e4
1 parent 46a1918 commit 18315f5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ v8.0.33
1515
- WL#15483: Support OCI ephemeral key-based authentication
1616
- WL#15435: Improve the logging system
1717
- WL#15401: Support for type hints in module mysqlx
18+
- BUG#35015758: COM_QUIT should not be called in the connection phase
1819
- BUG#31355895: Fix slow executemany() with insert statements
1920
- BUG#30103652: Connector/Python ClientFlag SESION_TRACK is a misspelling
2021
- BUG#27489972: Several COM_% commands have been deprecated

lib/mysql/connector/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ def _open_connection(self) -> None:
585585
self._socket.set_connection_timeout(None)
586586
except Exception:
587587
# close socket
588-
self.close()
588+
self._socket.close_connection()
589589
raise
590590

591591
if (

0 commit comments

Comments
 (0)