diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-06-07 11:19:23 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-06-10 12:56:32 -0400 |
commit | 85568fc596c301563270efe217715f14aea8aa19 (patch) | |
tree | 7ff10cfbaa8b5079b30a852e7a256cbd08ea8ffc /lib/sqlalchemy/sql/compiler.py | |
parent | b0bf421f1b12eeedd77ec6c39df8e5e6cc1fcc3f (diff) | |
download | sqlalchemy-85568fc596c301563270efe217715f14aea8aa19.tar.gz |
Don't discard inactive transaction until it is explicitly rolled back
The :class:`.Connection` object will now not clear a rolled-back
transaction until the outermost transaction is explicitly rolled back.
This is essentially the same behavior that the ORM :class:`.Session` has
had for a long time, where an explicit call to ``.rollback()`` on all
enclosing transactions is required for the transaction to logically clear,
even though the DBAPI-level transaction has already been rolled back.
The new behavior helps with situations such as the "ORM rollback test suite"
pattern where the test suite rolls the transaction back within the ORM
scope, but the test harness which seeks to control the scope of the
transaction externally does not expect a new transaction to start
implicitly.
Fixes: #4712
Change-Id: Ibc6c8d981cff31594a5d26dd5203fd9cfcea1c74
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
0 files changed, 0 insertions, 0 deletions