Skip to content

Commit

Permalink
Fixed bug calculating property max_identifier_length in thick mode when
Browse files Browse the repository at this point in the history
using older client libraries (#395).
  • Loading branch information
anthony-tuininga committed Nov 13, 2024
1 parent 68887bd commit 65536ad
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
6 changes: 5 additions & 1 deletion doc/src/api_manual/connection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,11 @@ Connection Attributes
in bytes supported by the database to which the connection has been
established. See `Database Object Naming Rules
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&
id=GUID-75337742-67FD-4EC0-985F-741C93D918DA>`__.
id=GUID-75337742-67FD-4EC0-985F-741C93D918DA>`__. The value may be
``None``, 30, or 128. The value ``None`` indicates the size cannot be
reliably determined by python-oracledb, which occurs when using Thick mode
with Oracle Client libraries 12.1 (or older) to connect to Oracle Database
12.2, or later.

.. versionadded:: 2.5.0

Expand Down
9 changes: 9 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ of python-oracledb), as affecting the optional :ref:`Thick Mode
oracledb 2.5.1 (TBD)
--------------------

Thick Mode Changes
++++++++++++++++++

#) Fixed bug calculating property :data:`Connection.max_identifier_length`
when using Oracle Client libraries 12.1, or older. The returned value may
now be ``None`` when the size cannot be reliably determined by
python-oracledb, which occurs when using Oracle Client libraries 12.1 (or
older) to connect to Oracle Database 12.2, or later.
(`ODPI-C <https://github.com/oracle/odpi>`__ dependency update).

oracledb 2.5.0 (November 2024)
------------------------------
Expand Down
3 changes: 2 additions & 1 deletion src/oracledb/impl/thick/connection.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,8 @@ cdef class ThickConnImpl(BaseConnImpl):
cdef dpiConnInfo info
if dpiConn_getInfo(self._handle, &info) < 0:
_raise_from_odpi()
return info.maxIdentifierLength
if info.maxIdentifierLength != 0:
return info.maxIdentifierLength

def get_max_open_cursors(self):
cdef uint32_t value
Expand Down
2 changes: 1 addition & 1 deletion src/oracledb/impl/thick/odpi

0 comments on commit 65536ad

Please sign in to comment.