Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#19198 closed Bug (fixed)

Oracle specific failures

Reported by: Anssi Kääriäinen Owned by: nobody
Component: Database layer (models, ORM) Version: 1.5-alpha-1
Severity: Normal Keywords: oracle
Cc: 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 Anssi Kääriäinen)

Two Oracle specific failures have been introduced lately:

  • Inability to deal with "%" in table or other identifier names (present in 1.5a1)
  • Oracle not working correctly for select_related cases where the related model is null but contains character fields (master only)

The first of the failures happens because Oracle backend does querystr % args formatting and if a table name contains '%' then the formatting will fail.

The second one happens because we check for if all fetched columns are None then set related object to None in models/ when creating the related objects. Due to a recent change we correctly convert the row values in for related select fields, too. This means that None values will be converted to "" and the check in models/ fails.

Draft patches available from:

Change History (5)

comment:1 Changed 7 years ago by Anssi Kääriäinen

Description: modified (diff)

comment:2 Changed 7 years ago by Anssi Kääriäinen

Two more failures:

  • Some gis tests try to run on default oracle. The test skipping checks only if the backend is 'oracle', not if it is gis enabled Oracle.
  • Inspectdb failure where Oracle reports twice the length for character columns. This is reported in #17202 as a separate issue.

I have implemented as-simple-as-possible fixes for the above cases. The fixes are:

  • Check that 'gis' is in the backend engine if the engine is Oracle
  • Mark the test as expected failure on Oracle

I am marking this as ready for commit. The patch-series is available from

All patches need to be backported. The only severe issue is the select_related case, but this isn't present in 1.5a1.

comment:3 Changed 7 years ago by Anssi Kääriäinen

Triage Stage: AcceptedReady for checkin

Aand... Actually marking as RFC.

comment:4 Changed 7 years ago by Anssi Kääriäinen <akaariai@…>

Resolution: fixed
Status: newclosed

In 908efca81723af7a3f4fb5b586e530ed7cd3952b:

Fixed #19198 -- merged 4 different Oracle fixes

comment:5 Changed 7 years ago by Anssi Kääriäinen

After little confusion I managed to backpatch the patches... I imagined I could cherry-pick the merge, but it seems that isn't possible... So, I cherry picked the individual commits instead.

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