#17886: LOUTER join not promoted across filter expression
-------------------------------------+-------------------------------------
     Reporter:  milosu               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:
  (models, ORM)                      |  1.4-beta-1
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
    Has patch:  1                    |  checkin
  Needs tests:  0                    |      Needs documentation:  0
Easy pickings:  0                    |  Patch needs improvement:  0
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Anssi Kääriäinen <akaariai@…>):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [a193372753ad9d1d15ad5e2d6d06bbc07ca3f433]:
 {{{
 #!CommitTicketReference repository=""
 revision="a193372753ad9d1d15ad5e2d6d06bbc07ca3f433"
 Fixed #17886 -- Fixed join promotion in ORed nullable queries

 The ORM generated a query with INNER JOIN instead of LEFT OUTER JOIN
 in a somewhat complicated case. The main issue was that there was a
 chain of nullable FK -> non-nullble FK, and the join promotion logic
 didn't see the need to promote the non-nullable FK even if the
 previous nullable FK was already promoted to LOUTER JOIN. This resulted
 in a query like a LOUTER b INNER c, which incorrectly prunes results.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17886#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to