[Django] #29286: QuerySet.values_list() crashes when combining annotated and not-annotated querysets with union().

8 views
Skip to first unread message

Django

unread,
Apr 3, 2018, 4:14:58 AM4/3/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: 2.0
layer (models, ORM) |
Severity: Release | Keywords:
blocker |
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
`QuerySet.values_list()` crashes when combining annotated and not-
annotated querysets with union().

Regression in
https://github.com/django/django/commit/a0c03c62a8ac586e5be5b21393c925afa581efaf.

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

Django

unread,
Apr 3, 2018, 4:15:50 AM4/3/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* Attachment "29286.diff" added.

Regression test.

Django

unread,
Apr 3, 2018, 4:22:15 AM4/3/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* Attachment "29286.diff" added.

Regression test.

--

Django

unread,
Apr 3, 2018, 4:22:54 AM4/3/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* Attachment "29286.diff" added.

Regression test.

--

Django

unread,
Apr 3, 2018, 6:26:02 AM4/3/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/29286#comment:1>

Django

unread,
Apr 3, 2018, 6:29:27 AM4/3/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned

Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* owner: nobody => felixxm
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29286#comment:2>

Django

unread,
Apr 12, 2018, 6:23:19 AM4/12/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned
Component: Database layer | Version: 1.11

(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* has_patch: 0 => 1
* version: 2.0 => 1.11


Comment:

[https://github.com/django/django/pull/9872 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/29286#comment:3>

Django

unread,
Apr 12, 2018, 9:45:33 AM4/12/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/29286#comment:4>

Django

unread,
Apr 12, 2018, 11:47:20 AM4/12/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Ready for checkin => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/29286#comment:5>

Django

unread,
Apr 12, 2018, 9:39:31 PM4/12/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/29286#comment:6>

Django

unread,
Apr 13, 2018, 6:16:22 AM4/13/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: closed

Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"0b66c3b442875627fa6daef4ac1e90900d74290b" 0b66c3b]:
{{{
#!CommitTicketReference repository=""
revision="0b66c3b442875627fa6daef4ac1e90900d74290b"
Fixed #29286 -- Fixed column mismatch crash with QuerySet.values() or
values_list() after combining an annotated and unannotated queryset with
union(), difference(), or intersection().

Regression in a0c03c62a8ac586e5be5b21393c925afa581efaf.

Thanks Tim Graham and Carlton Gibson for reviews.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29286#comment:7>

Django

unread,
Apr 13, 2018, 6:36:32 AM4/13/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: closed
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"3619d322098ae3573707adae22cb0c086e948210" 3619d322]:
{{{
#!CommitTicketReference repository=""
revision="3619d322098ae3573707adae22cb0c086e948210"
[2.0.x] Fixed #29286 -- Fixed column mismatch crash with QuerySet.values()


or values_list() after combining an annotated and unannotated queryset
with union(), difference(), or intersection().

Regression in a0c03c62a8ac586e5be5b21393c925afa581efaf.

Thanks Tim Graham and Carlton Gibson for reviews.

Backport of 0b66c3b442875627fa6daef4ac1e90900d74290b from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29286#comment:8>

Django

unread,
Apr 13, 2018, 6:56:28 AM4/13/18
to django-...@googlegroups.com
#29286: QuerySet.values_list() crashes when combining annotated and not-annotated
querysets with union().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: closed
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"f89b11b879b83aa505dc8231da5f06ca4b1b062e" f89b11b8]:
{{{
#!CommitTicketReference repository=""
revision="f89b11b879b83aa505dc8231da5f06ca4b1b062e"
[1.11.x] Fixed #29286 -- Fixed column mismatch crash with


QuerySet.values() or values_list() after combining an annotated and
unannotated queryset with union(), difference(), or intersection().

Regression in a0c03c62a8ac586e5be5b21393c925afa581efaf.

Thanks Tim Graham and Carlton Gibson for reviews.

Backport of 0b66c3b442875627fa6daef4ac1e90900d74290b from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29286#comment:9>

Reply all
Reply to author
Forward
0 new messages