Skip to content
Snippets Groups Projects
Commit d46f4309 authored by Leila Gonzales's avatar Leila Gonzales Committed by Demian Katz
Browse files

Update for compatibility with MySQL 5.7+ and PostgreSQL

getUniqueResources, getUniqueTags, and getUniqueUsers was failing due to mySQL5.7 compatibility issues. The error being thrown by mySQL was: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

To fix, we have to either turn off the only_full_group_by option or specifically select the columns that are used instead of selecting *.

See: https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html for more info.

PostgreSQL was failing due to fields being present in ORDER but missing from GROUP BY. This has also been corrected.
parent 65fac11c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment