-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mysql2::Error: Expression #1 of SELECT list is not in GROUP BY clause (locally only) #3120
Comments
This seems to say that any column/field we select MUST be in the GROUP_BY call too. Weird, because we don't use select near here, only up on line 93: plots2/app/controllers/home_controller.rb Line 93 in 6f353b2
|
But ActiveRecord produces a select from our query, the full query being: SELECT `node_revisions`.* FROM `node_revisions` INNER JOIN `node` ON `node`.`nid` = `node_revisions`.`nid` WHERE (type = ('page')) AND (node.status = 1) AND (node_revisions.status = 1) AND (timestamp - node.created > 300) GROUP BY node.title, node.nid ORDER BY timestamp DESC LIMIT 10 |
Also noting that the default for the
|
…ymbol #2913 (#2925) * initial setup commit * [WIP] updated emoji to read from static file, upstream fetch & rebase * [WIP] added autocomplete username to comment window using atwho library * [WIP] Add autocompleting usernames with @ symbol #2913 fixed typo * [WIP] refactoring atwho calls * finished refactoring using API call, adjusted indentations * removed unnecessary example file * [WIP] testing hashtag_config behavior, removed unnecessary files * [WIP] refactored hash_config, removed unnecessary file, set limits for dropdowns * [WIP] updated emoji code, rebased, removed unneccessary file * [WIP] removed unneccsary atwho code from application_helper.rb * updated hash call with conditional, removed query from emoji call, set limit for at callbacks to 20 * emoji fixes * resolved #3120 ONLY_FULL_GROUP_BY issue w/ mysql 5.7+
…ymbol publiclab#2913 (publiclab#2925) * initial setup commit * [WIP] updated emoji to read from static file, upstream fetch & rebase * [WIP] added autocomplete username to comment window using atwho library * [WIP] Add autocompleting usernames with @ symbol publiclab#2913 fixed typo * [WIP] refactoring atwho calls * finished refactoring using API call, adjusted indentations * removed unnecessary example file * [WIP] testing hashtag_config behavior, removed unnecessary files * [WIP] refactored hash_config, removed unnecessary file, set limits for dropdowns * [WIP] updated emoji code, rebased, removed unneccessary file * [WIP] removed unneccsary atwho code from application_helper.rb * updated hash call with conditional, removed query from emoji call, set limit for at callbacks to 20 * emoji fixes * resolved publiclab#3120 ONLY_FULL_GROUP_BY issue w/ mysql 5.7+
My local instance is seeing the same error we saw on June 7 (#2787 (comment)) that I thought we fixed in #2794
Mysql2::Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'plots.node_revisions.vid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: SELECT
node_revisions.* FROM
node_revisionsINNER JOIN
nodeON
node.
nid=
node_revisions.
nidWHERE (type = ('page')) AND (node.status = 1) AND (node_revisions.status = 1) AND (timestamp - node.created > 300) GROUP BY node.title, node.nid ORDER BY timestamp DESC LIMIT 10
On line 127 of
home_controller.rb
, but really to do with the preceding ActiveRecord call:plots2/app/controllers/home_controller.rb
Lines 117 to 124 in 6f353b2
I'm going to try tweaking locally to get past it.
The text was updated successfully, but these errors were encountered: