]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Don't call rollback on DBAPI connection that's "closed"
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 14 Oct 2018 19:55:46 +0000 (15:55 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 14 Oct 2018 23:17:30 +0000 (19:17 -0400)
commitae9f73338198a005d25deb8a54f634f98dad2b90
tree19d717c7134e202853632e17b35d8c9996f72f19
parent8ad51b601e9a28a5b416e9d218218710c4328f28
Don't call rollback on DBAPI connection that's "closed"

Use the existence of ConnectionRecord.connection to estimate
that this connection is likely closed, and if so, don't
try to call "rollback" on it.  This rollback is normally harmless
but is causing segfaults in mysqlclient due to
https://github.com/PyMySQL/mysqlclient-python/issues/270.

Change-Id: I1d7c5f5a520527d8268b6334795c2051f7ceeea6
(cherry picked from commit a8781b51b4039eee56791b9dbfdee183f7a5b797)
lib/sqlalchemy/testing/engines.py