Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#29286 closed Bug (fixed)

QuerySet.values_list() crashes when combining annotated and not-annotated querysets with union().

Reported by: felixxm Owned by: felixxm
Component: Database layer (models, ORM) Version: 1.11
Severity: Release blocker Keywords:
Cc: felixxm 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

QuerySet.values_list() crashes when combining annotated and not-annotated querysets with union().

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

Attachments (1)

29286.diff (1.2 KB) - added by felixxm 23 months ago.
Regression test.

Download all attachments as: .zip

Change History (10)

Changed 23 months ago by felixxm

Attachment: 29286.diff added

Regression test.

comment:1 Changed 23 months ago by Claude Paroz

Triage Stage: UnreviewedAccepted

comment:2 Changed 23 months ago by felixxm

Owner: changed from nobody to felixxm
Status: newassigned

comment:3 Changed 23 months ago by felixxm

Has patch: set
Version: 2.01.11

comment:4 Changed 23 months ago by Carlton Gibson

Triage Stage: AcceptedReady for checkin

comment:5 Changed 23 months ago by Carlton Gibson

Triage Stage: Ready for checkinAccepted

comment:6 Changed 23 months ago by Tim Graham

Triage Stage: AcceptedReady for checkin

comment:7 Changed 23 months ago by GitHub <noreply@…>

Resolution: fixed
Status: assignedclosed

In 0b66c3b:

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.

comment:8 Changed 23 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 3619d322:

[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

comment:9 Changed 23 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In f89b11b8:

[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.

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