MySQL error

7 views
Skip to first unread message

Greg Childers

unread,
Nov 8, 2021, 5:48:58 PM11/8/21
to Boinc Projects
Hi,

I just noticed an error on my server when viewing teams. The following MySQL query is run from team.inc line 351:

select * from nfs.team_delta where teamid=649 and timestamp>1636322637 and joining=1 group by userid;

which gives the error

Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'nfs.team_delta.timestamp' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

For now I resolved this by disabling only_full_group_by in MySQL, but in current versions it is enabled by default. 

Best,
Greg

David P. Anderson

unread,
Nov 8, 2021, 6:32:30 PM11/8/21
to Greg Childers, Boinc Projects
What version of MySQL are you using?
-- D

--
You received this message because you are subscribed to the Google Groups "boinc_projects" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boinc_project...@ssl.berkeley.edu.
To view this discussion on the web visit https://groups.google.com/a/ssl.berkeley.edu/d/msgid/boinc_projects/CAPOvAR4h3-OX4TBcYM%2B0Hid3hELfEnLQRJ%2B8YtpYy41%3DAC%2BA%3Dg%40mail.gmail.com.

Greg Childers

unread,
Nov 8, 2021, 7:22:39 PM11/8/21
to David P. Anderson, Boinc Projects
$ mysql --version
mysql  Ver 14.14 Distrib 5.7.36, for Linux (x86_64) using  EditLine wrapper

ONLY_FULL_GROUP_BY is enabled by default starting with MySQL 5.7.5.
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by

Greg

David P. Anderson

unread,
Nov 8, 2021, 11:08:45 PM11/8/21
to Greg Childers, Boinc Projects
Thanks.
(by doing "group by" differently)
--David
Reply all
Reply to author
Forward
0 new messages