#35655 closed Bug (fixed)
Oracle > 23.3 does not support bulk insert with multiple rows
Reported by: | Suraj Shaw | Owned by: | Sarah Boyce |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 5.1 |
Severity: | Release blocker | Keywords: | |
Cc: | Suraj Shaw, Csirmaz Bendegúz, Mariusz Felisiak | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The recent optimisation in Django for multi-row insert in case of Oracle db version greater than 23+ is crashing with specific db versions. The issue is being reported https://github.com/oracle/python-oracledb/issues/356. The upcoming version 5.1 release have this changes and may cause crashes with database versions greater than 23.3.
Link to the PR which added this optimisation - https://github.com/django/django/pull/17969/
Change History (10)
comment:1 by , 4 months ago
Summary: | Django crashes with oracle_db_version > 23.3 → Django crashes with Oracle database Version > 23.3 |
---|
comment:3 by , 4 months ago
Easy pickings: | unset |
---|
comment:4 by , 4 months ago
Description: | modified (diff) |
---|
comment:5 by , 4 months ago
Cc: | added |
---|
comment:6 by , 4 months ago
As for me, it's an issue in Oracle not in Django itself. (2) and (3) are not doable (at least on this stage of our release cycle, (3) probably never, TBH). I'm not sure it's worth keeping 175b04942afaff978013db61495f3b39ea12989b for 23.3 > Oracle >= 23.0. Let's revert it, we can also close #35295 as "wontfix" (waiting for Oracle to make it work as promised).
comment:8 by , 4 months ago
Has patch: | set |
---|---|
Owner: | changed from | to
Summary: | Django crashes with Oracle database Version > 23.3 → Oracle > 23.3 does not support bulk insert with multiple rows |
Triage Stage: | Unreviewed → Accepted |
The issue is reproducible.
Probable Fixes:
1 -> Switch to earlier version for multi-row insert (using select-union combination) till the issue is being resolved.
2-> Migrate to ExecuteMany() instead of Execute() for multi-row insert.
3-> Migrate from NVARCHAR2 to VARCHAR2 as it also resolves the issue with multi-row insert.