Opened 3 weeks ago

Closed 2 weeks ago

Last modified 2 weeks ago

#37411 closed New feature (fixed)

Add support for python-oracledb version 26

Reported by: Jacob Walls Owned by: Jacob Walls
Component: Database layer (models, ORM) Version: 6.1
Severity: Normal Keywords: Oracle
Cc: Mariusz Felisiak Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mariusz Felisiak)

Version 26 of the python-oracledb driver was released in September 2026, causing failures in our GIS tests:

django.db.utils.DatabaseError: Problem installing fixture '/django/source/tests/gis_tests/geoapp/fixtures/initial.json.gz':Could not load geoapp.Country(pk=1): ORA-01461: The value at bind position 2 exceeded the maximum VARCHAR2 length.
Help: https://docs.oracle.com/error-help/db/ora-01461/

It relates to a behavior change -- you can no longer pass long strings (like this geometry from the test fixture) as parameters by calling setinputsizes(DB_TYPE_CLOB): you must actually create the LOB first. See this ​issue discussion.

Our Oracle backend already has logic to "request" a CLOB -- I presume the fix is as outlined on the oracledb issue: in those cases, take responsibility for creating the CLOB ourselves.

I presume we will backport to at least mainstream support (6.1) like #36646, and possibly document on lower versions an upper bound on python-oracledb like 99e033694c54b5d0e2cfd796ce598cc1e6c9af4a

Change History (7)

comment:1 by Mariusz Felisiak, 3 weeks ago

Description: modified (diff)
Triage Stage: Unreviewed → Accepted

comment:2 by Jacob Walls, 3 weeks ago

Has patch: set

comment:3 by Jacob Walls <jacobtylerwalls@…>, 3 weeks ago

In 52e5ba16:

[6.0.x] Refs #37411 -- Doc'd that oracledb < 26.0.0 is required.

comment:4 by Jacob Walls <jacobtylerwalls@…>, 3 weeks ago

In cae72479:

[5.2.x] Refs #37411 -- Doc'd that oracledb < 26.0.0 is required.

Backport of 52e5ba169694cbd70c538ce62275cd2abd7647fd from stable/6.0.x.

comment:5 by Mariusz Felisiak, 3 weeks ago

Triage Stage: Accepted → Ready for checkin

comment:6 by Jacob Walls <jacobtylerwalls@…>, 2 weeks ago

Resolution: → fixed
Status: assigned → closed

In cf63ff2:

Fixed #37411 -- Added compatibility for oracledb 26.0.0+.

oracledb 26.0.0 introduced the requirement that large parameter values
be provided via a temporary LOB when calling PL/SQL functions. We noticed
when GIS test fixtures failed to load, as the Multipolygon WKT for Texas
was a string well over the 4000 characters that trigger the LOB path.

​https://github.com/oracle/python-oracledb/issues/618

Thanks Mariusz Felisiak for the review.

comment:7 by Jacob Walls <jacobtylerwalls@…>, 2 weeks ago

In 23c8249b:

[6.1.x] Fixed #37411 -- Added compatibility for oracledb 26.0.0+.

oracledb 26.0.0 introduced the requirement that large parameter values
be provided via a temporary LOB when calling PL/SQL functions. We noticed
when GIS test fixtures failed to load, as the Multipolygon WKT for Texas
was a string well over the 4000 characters that trigger the LOB path.

​https://github.com/oracle/python-oracledb/issues/618

Thanks Mariusz Felisiak for the review.

Backport of cf63ff2186852ee1aac4a802b0ff6a93f6e08891 from main.

Note: See TracTickets for help on using tickets.
Back to Top