]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Actively unset reset agent in discard transaction
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 14 May 2020 14:51:29 +0000 (10:51 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 14 May 2020 15:05:14 +0000 (11:05 -0400)
commit91bea2649c933a05ff4735ae80a39d22928ce14c
tree0641e51d4927739c59827c62becc027b519061bd
parent6a2c738761013b27f10e594fb8024abbc27e6e82
Actively unset reset agent in discard transaction

The assumptions in _discard_transaction from
916e1fea25afcd07fa1d1d2f72043b372cd02223 were too narrow,
assuming that if the given transaction were not our
"current" one, that this would not be the reset agent.  however
as the legacy behvaior is that even a "nested" transaction gets
set as "self._transaction", this did not accommodate for the nested
transaction being thrown away.   We will attempt to refine all of this
logic in #5327 for 1.4 /master assuming this is feasible for the
full suite of current use cases.

Fixes: #5326
Change-Id: I6787e82c9e50c23317f87d0d094122c6a6f066da
(cherry picked from commit 79de84b25e87bbb7fa94f0dd513b4abc76e05a7e)
doc/build/changelog/unreleased_13/5326.rst [new file with mode: 0644]
lib/sqlalchemy/engine/base.py
test/engine/test_transaction.py