Skip to content

Commit d3555d4

Browse files
Raise not supported exception when fetching a degenerate image (actual
image is stored in a LOB instead of inline)
1 parent 3bc7d37 commit d3555d4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/src/release_notes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ Thin Mode Changes
5151
#) Fixed bug when using :ref:`asyncio <concurrentprogramming>` and calling a
5252
stored procedure with data that exceeds 32767 bytes in length
5353
(`issue 441 <https://github.com/oracle/python-oracledb/issues/441>`__).
54+
#) Fixed bug when attempting to fetch a database object stored in a LOB. The
55+
fetch will still fail but with an unsupported error exception instead of a
56+
hang.
5457
#) Error ``DPY-6002: The distinguished name (DN) on the server certificate
5558
does not match the expected value: "{expected_dn}"`` now shows the expected
5659
value.

src/oracledb/impl/thin/dbobject.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2022, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2025, Oracle and/or its affiliates.
33
#
44
# This software is dual-licensed to you under the Universal Permissive License
55
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -76,6 +76,8 @@ cdef class DbObjectPickleBuffer(GrowableBuffer):
7676
self.read_ub1(flags)
7777
self.read_ub1(version)
7878
self.skip_length()
79+
if flags[0] & TNS_OBJ_IS_DEGENERATE:
80+
errors._raise_not_supported("DbObject stored in a LOB")
7981
if flags[0] & TNS_OBJ_NO_PREFIX_SEG:
8082
return 0
8183
self.read_length(&prefix_seg_length)

0 commit comments

Comments
 (0)