diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-08-21 14:21:50 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-08-22 16:17:39 -0400 |
commit | 8b53548b9e972f243adaf5b4599b0ddd9e43927b (patch) | |
tree | 28de33a1c98f1593b4457f16aa731c2971f6d393 /lib/sqlalchemy/testing | |
parent | 41549de9609bce90942ca6afc75978d5254c8fd5 (diff) | |
download | sqlalchemy-8b53548b9e972f243adaf5b4599b0ddd9e43927b.tar.gz |
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
Diffstat (limited to 'lib/sqlalchemy/testing')
-rw-r--r-- | lib/sqlalchemy/testing/fixtures.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index 8cd6e9f9e..bfd98a407 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -223,9 +223,9 @@ class RemovesEvents(object): def _event_fns(self): return set() - def event_listen(self, target, name, fn): + def event_listen(self, target, name, fn, **kw): self._event_fns.add((target, name, fn)) - event.listen(target, name, fn) + event.listen(target, name, fn, **kw) def teardown(self): for key in self._event_fns: |