Skip to content
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

SQL Mode requirement not documented #1547

Closed
crossan007 opened this issue Dec 7, 2016 · 7 comments
Closed

SQL Mode requirement not documented #1547

crossan007 opened this issue Dec 7, 2016 · 7 comments

Comments

@crossan007
Copy link
Contributor

crossan007 commented Dec 7, 2016

SQL mode must not contain ONLY_FULL_GROUP_BY

@crossan007 crossan007 added this to the 2.4.1 milestone Dec 7, 2016
@crossan007
Copy link
Contributor Author

It seems that the Vagrant SQL is 5.5.46, which works fine, but 5.7.16 changes the way GROUP BY clauses work: http://craftcms.stackexchange.com/questions/12084/getting-this-sql-error-group-by-incompatible-with-sql-mode-only-full-group-by

one solution is to set the global sql mode

SET GLOBAL sql_mode = '';

@crossan007
Copy link
Contributor Author

doctrine/orm#5622

@crossan007
Copy link
Contributor Author

@crossan007
Copy link
Contributor Author

20
down vote
Adding only one mode to sql_mode without removing existing ones:

SET sql_mode=(SELECT CONCAT(@@sql_mode,',<mode_to_add>'));
Removing only a specific mode from sql_mode without removing others:

SET sql_mode=(SELECT REPLACE(@@sql_mode,'<mode_to_remove>',''));
In your case, if you want to remove only ONLY_FULL_GROUP_BY mode, then use below command:

SET sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''));
Reference: http://johnemb.blogspot.com/2014/09/adding-or-removing-individual-sql-modes.html

@crossan007
Copy link
Contributor Author

crossan007 commented Feb 26, 2017

This Sort of relates to https://github.com/ChurchCRM/VagrantBox/issues/5 - We don't get the error in testing because we're testing with old software.

@crossan007
Copy link
Contributor Author

I think this is here: propelorm/Propel2#1129

@crossan007
Copy link
Contributor Author

See #2380

@ghost ghost removed the bug label Apr 26, 2017
@DawoudIO DawoudIO added this to the 2.7.3 milestone Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants