]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Deactivate transaction if rollback fails
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 21 Aug 2017 18:21:50 +0000 (14:21 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 22 Aug 2017 20:17:39 +0000 (16:17 -0400)
commit8b53548b9e972f243adaf5b4599b0ddd9e43927b
tree28de33a1c98f1593b4457f16aa731c2971f6d393
parent41549de9609bce90942ca6afc75978d5254c8fd5
Deactivate transaction if rollback fails

Fixed regression introduced in 1.2.0b1 due to :ticket:`3934` where the
:class:`.Session` would fail to "deactivate" the transaction, if a
rollback failed (the target issue is when MySQL loses track of a SAVEPOINT).
This would cause a subsequent call to :meth:`.Session.rollback` to raise
an error a second time, rather than completing and bringing the
:class:`.Session` back to ACTIVE.

Fixes: #4050
Change-Id: Id245e8dd3487cb006b2d6631c8bd513b5ce81abe
doc/build/changelog/unreleased_12/4050.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/testing/fixtures.py
test/orm/test_transaction.py