Skip to content

Fix distinct queries

Hugo Leisink requested to merge tkcent:patch-1 into master

Created by: tkcent

As of MySQL v5.7.5 they changed the default SQL mode to include ONLY_FULL_GROUP_BY.

This means that a query with fields in the ORDER BY clause also need to have those fields in the SELECT statement when they are grouped by DISTINCT.

Merge request reports