summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-02-04 18:51:24 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-02-04 18:51:24 -0500
commit068f9a1531c8114360d5fcd964c27fe6a21f4679 (patch)
tree3eb3a1a85af928f792c4de42d1d16520ec4575a7 /lib/sqlalchemy/engine/base.py
parent9cbe235810b7c0c24d2556b4bb581b0207812e2d (diff)
downloadsqlalchemy-068f9a1531c8114360d5fcd964c27fe6a21f4679.tar.gz
- Fixed bug in :class:`.Connection` and pool where the
:meth:`.Connection.invalidate` method, or an invalidation due to a database disconnect, would fail if the ``isolation_level`` parameter had been used with :meth:`.Connection.execution_options`; the "finalizer" that resets the isolation level would be called on the no longer opened connection. fixes #3302
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r--lib/sqlalchemy/engine/base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
index 8d6dd636a..305fa4620 100644
--- a/lib/sqlalchemy/engine/base.py
+++ b/lib/sqlalchemy/engine/base.py
@@ -235,6 +235,13 @@ class Connection(Connectable):
transaction has been started with :meth:`.Connection.begin`
or similar.
+ .. note:: The ``isolation_level`` execution option is implicitly
+ reset if the :class:`.Connection` is invalidated, e.g. via
+ the :meth:`.Connection.invalidate` method, or if a
+ disconnection error occurs. The new connection produced after
+ the invalidation will not have the isolation level re-applied
+ to it automatically.
+
.. seealso::
:paramref:`.create_engine.isolation_level`