]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Detect PyMySQL connection was killed
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 11 Nov 2019 21:17:50 +0000 (16:17 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 11 Nov 2019 21:20:42 +0000 (16:20 -0500)
commitd5a16a1283e2a44d8bf22c0884440693493d104a
tree6c9d5a6fb3487691fb4c49b5fa57d262c4f66910
parentf26af5d6177ce4a426a94ac293d7a5dfccb1412d
Detect PyMySQL connection was killed

Added "Connection was killed" message interpreted from the base
pymysql.Error class in order to detect closed connection, based on reports
that this message is arriving via a pymysql.InternalError() object which
indicates pymysql is not handling it correctly.

Change-Id: If6bbe0eb5993e1996c0c5de752eebaf7446cf93e
References: https://github.com/PyMySQL/PyMySQL/issues/816
Fixes: #4945
(cherry picked from commit 31a66b5add39b9193975f9995ce5cd9235179f00)
doc/build/changelog/unreleased_13/4945.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/pymysql.py
test/dialect/mysql/test_dialect.py