#34639: MySQL 8.0 hangs indefinitely when using the admin search with a Foreign
Key
and Annotate
--------------------------------+--------------------------------------
Reporter: Nicolas Lupien | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution: invalid
Keywords: mysql | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Comment (by Simon Charette):
It looks like this relates to #32682
(187118203197801c6cb72dc8b06b714b23b6dd3d).
The fact `self.root_queryset` is used without ''stripping'' unused
annotations (e.g. the `Count` one) explains why the reporter is able to
work around the issue by only annotating after the `Exists` filter is
added.
Adjusting `SQLQuery.exists` to ''strip'' used annotation (like we did with
`SQLQuery.get_aggreation` in #28477
(59bea9efd2768102fc9d3aedda469502c218e9b7)) could be a possible way to
generically optimize this problem away.
--
Ticket URL: <https://code.djangoproject.com/ticket/34639#comment:5>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018897881309-f4485a68-8455-49bf-a822-8af67f2a6e43-000000%40eu-central-1.amazonses.com.