Fix: SQLSTATE[42000]: Syntax error or access violation#5
Closed
mn-martin wants to merge 1 commit intoteppokoivula:masterfrom
Closed
Fix: SQLSTATE[42000]: Syntax error or access violation#5mn-martin wants to merge 1 commit intoteppokoivula:masterfrom
mn-martin wants to merge 1 commit intoteppokoivula:masterfrom
Conversation
Your Selector is not compatible with: sql_mode=only_full_group_by Errors: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression teppokoivula#7 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'objektdatenbank.d.property' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (in /site/modules/VersionControl/ProcessVersionControl.module line 249) SQLSTATE[42000]: Syntax error or access violation: 1055 Expression teppokoivula#8 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'objektdatenbank.d.data' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (in /site/modules/VersionControl/ProcessVersionControl.module line 248) SQLSTATE[42000]: Syntax error or access violation: 1055 Expression teppokoivula#2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'objektdatenbank.d.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (in /site/modules/VersionControl/ProcessVersionControl.module line 249)
Owner
|
Thanks, @mn-martin, and sorry for taking so long to respond! For the record, I ended up solving this in a more "verbose" way. Probably since my test environment is running on a relatively old version of MySQL, even with your changes I still got a bunch of errors as soon as I enabled ONLY_FULL_GROUP_BY. Unless I'm missing something here, the original query was already "standard SQL", but MySQL doesn't properly recognise functional dependencies with GROUP BY. 5.7.5 introduced notable improvements to this part, but it seems to me that some cases still might not work perfectly. If you get a chance to test the latest version of the module, please let me know if it fixes this problem for you. Thanks again for bringing this to my attention! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Your Selector is not compatible with: sql_mode=only_full_group_by
Errors:
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #7 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'objektdatenbank.d.property' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (in /site/modules/VersionControl/ProcessVersionControl.module line 249)
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #8 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'objektdatenbank.d.data' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (in /site/modules/VersionControl/ProcessVersionControl.module line 248)
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'objektdatenbank.d.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (in /site/modules/VersionControl/ProcessVersionControl.module line 249)