Skip to content

[Rails5] Fix GROUP BY for mysql

Jan Provaznik requested to merge rails5-fix-group-by-ee into master

What does this MR do?

Fixes issue with "SELECT list is not in GROUP BY clause and contains nonaggregated column" error for mysql.

Similar to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20256

Are there points in the code the reviewer needs to double check?

Yes, this changes SQL query with potential performance impact.

Why was this MR needed?

Because only_full_group_by is default in rails 5, we must have all columns from SELECT also in GROUP BY clause.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #6932 (closed)

Edited by Yorick Peterse

Merge request reports