]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Gracefully degrade on v$transaction not readable
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 18 Dec 2020 14:28:06 +0000 (09:28 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 18 Dec 2020 17:27:34 +0000 (12:27 -0500)
commitd6842bcb722f07ef9fe62e0888ee8ef3c7fd963c
tree3a2a84f87ea0f344688725a2ddc91c7b25579580
parent3f31da2a45d4e56a67c7646091f2a6f25e0d13d9
Gracefully degrade on v$transaction not readable

Fixed regression which occured due to [ticket:5755] which implemented
isolation level support for Oracle.   It has been reported that many Oracle
accounts don't actually have permission to query the ``v$transaction``
view so this feature has been altered to gracefully fallback when it fails
upon database connect, where the dialect will assume "READ COMMITTED" is
the default isolation level as was the case prior to SQLAlchemy 1.3.21.
However, explicit use of the :meth:`_engine.Connection.get_isolation_level`
method must now necessarily raise an exception, as Oracle databases with
this restriction explicitly disallow the user from reading the current
isolation level.

Fixes: #5784
Change-Id: Iefc82928744f3c944c18ae8000eb3c9e52e523bc
(cherry picked from commit 566f1b520e05659ba4d4928c740a9aa1b0fed614)
doc/build/changelog/unreleased_13/5784.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/interfaces.py
test/dialect/oracle/test_dialect.py