Code

Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#19198 closed Bug (fixed)

Oracle specific failures

Reported by: akaariai 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 akaariai)

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/query.py when creating the related objects. Due to a recent change we correctly convert the row values in compiler.py for related select fields, too. This means that None values will be converted to "" and the check in models/query.py fails.

Draft patches available from: https://github.com/akaariai/django/compare/fix_oracle2

Attachments (0)

Change History (5)

comment:1 Changed 21 months ago by akaariai

  • Description modified (diff)

comment:2 Changed 21 months ago by akaariai

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 https://github.com/akaariai/django/compare/fix_oracle2

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 21 months ago by akaariai

  • Triage Stage changed from Accepted to Ready for checkin

Aand... Actually marking as RFC.

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

  • Resolution set to fixed
  • Status changed from new to closed

In 908efca81723af7a3f4fb5b586e530ed7cd3952b:

Fixed #19198 -- merged 4 different Oracle fixes

comment:5 Changed 21 months ago by akaariai

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.