diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-09 11:09:16 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-09 11:55:43 -0400 |
commit | 5ba31b5a8768e1ca1a08a82144ec0e726d8357c1 (patch) | |
tree | f37a132eb427774685b7627c6b1997c084f2ca89 /lib/sqlalchemy/testing/assertsql.py | |
parent | d868f7914cd0617d529a6067e8ec7843692f8937 (diff) | |
download | sqlalchemy-5ba31b5a8768e1ca1a08a82144ec0e726d8357c1.tar.gz |
Dont return outer transaction for _subtrans flag
Fixed critical regression where the :class:`_orm.Session` could fail to
"autobegin" a new transaction when a flush occurred without an existing
transaction in place, implicitly placing the :class:`_orm.Session` into
legacy autocommit mode which commit the transaction. The
:class:`_orm.Session` now has a check that will prevent this condition from
occurring, in addition to repairing the flush issue.
Additionally, scaled back part of the change made as part of :ticket:`5226`
which can run autoflush during an unexpire operation, to not actually
do this in the case of a :class:`_orm.Session` using legacy
:paramref:`_orm.Session.autocommit` mode, as this incurs a commit within
a refresh operation.
Fixes: #6233
Change-Id: Ia980e62a090e39e3e2a7fb77c95832ae784cc9a5
Diffstat (limited to 'lib/sqlalchemy/testing/assertsql.py')
0 files changed, 0 insertions, 0 deletions