#34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group 
on"
on MySQL/MariaDB.
-------------------------------------+-------------------------------------
     Reporter:  Matthew Somerville   |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  4.2
  (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
-------------------------------------+-------------------------------------

Comment (by Matthew Somerville):

 > So in this case play.name is functionally dependant on play.id (as it's
 the primary key of play) so if you're using a version of MySQL supported
 on Django 4.2 we'd definitely like to learn more about it as it's
 unexpected.

 So it turns out the database is MariaDB (11.1.2), not MySQL, and MariaDB
 does not appear to include/have the functional dependency requirement that
 this is based on. I don't know if you'd like me to raise that as a
 separate ticket, if Django is supposed to support both entirely equally,
 but yes, it looks like the code will not work at all with MariaDB with
 ONLY_FULL_GROUP_BY turned on.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34978#comment:10>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018bf83d248f-6f705cd5-9761-4f06-84f4-a9f119e2ea02-000000%40eu-central-1.amazonses.com.

Reply via email to