]> 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:17:50 +0000 (16:17 -0500)
commit31a66b5add39b9193975f9995ce5cd9235179f00
treebfd43a0c6cc3dfd8187b29bcc2f4b7d709db3048
parent5c7754d685df3715da76327c7401e99177611daf
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
doc/build/changelog/unreleased_13/4945.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/pymysql.py
test/dialect/mysql/test_dialect.py