Skip to content

Commit 65536ad

Browse files
Fixed bug calculating property max_identifier_length in thick mode when
using older client libraries (#395).
1 parent 68887bd commit 65536ad

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

doc/src/api_manual/connection.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,11 @@ Connection Attributes
760760
in bytes supported by the database to which the connection has been
761761
established. See `Database Object Naming Rules
762762
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&
763-
id=GUID-75337742-67FD-4EC0-985F-741C93D918DA>`__.
763+
id=GUID-75337742-67FD-4EC0-985F-741C93D918DA>`__. The value may be
764+
``None``, 30, or 128. The value ``None`` indicates the size cannot be
765+
reliably determined by python-oracledb, which occurs when using Thick mode
766+
with Oracle Client libraries 12.1 (or older) to connect to Oracle Database
767+
12.2, or later.
764768

765769
.. versionadded:: 2.5.0
766770

doc/src/release_notes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ of python-oracledb), as affecting the optional :ref:`Thick Mode
1414
oracledb 2.5.1 (TBD)
1515
--------------------
1616

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

1827
oracledb 2.5.0 (November 2024)
1928
------------------------------

src/oracledb/impl/thick/connection.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,8 @@ cdef class ThickConnImpl(BaseConnImpl):
666666
cdef dpiConnInfo info
667667
if dpiConn_getInfo(self._handle, &info) < 0:
668668
_raise_from_odpi()
669-
return info.maxIdentifierLength
669+
if info.maxIdentifierLength != 0:
670+
return info.maxIdentifierLength
670671

671672
def get_max_open_cursors(self):
672673
cdef uint32_t value

0 commit comments

Comments
 (0)