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

GROUP BY clause is incompatible with sql_mode=only_full_group_by #445

Open
ubun2Junky opened this Issue Jun 25, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@ubun2Junky

ubun2Junky commented Jun 25, 2018

Coral: 3.0
PHP: 7.0
MySQL: 5.7

Installed fresh version of Coral on a docker container and I kept on getting the following error displayed on the Management module. I also had similar errors on the Licensing, Organizations and Statistics Module:

Uncaught Exception: There was a problem with the database: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'coral_management.L.shortName' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /var/www/html/management/admin/classes/common/DBService.php:55

I did manage to remove the error messages by applying the following command on MySQL command line:
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

@veggiematts veggiematts added the bug label Jun 28, 2018

@veggiematts

This comment has been minimized.

Contributor

veggiematts commented Jul 2, 2018

I can confirm it's also broken with MariaDB 10.0.34 when ONLY_FULL_GROUP_BY is enabled.

@t4k

This comment has been minimized.

Contributor

t4k commented Jul 10, 2018

See #235.

@t4k

This comment has been minimized.

Contributor

t4k commented Jul 10, 2018

Thanks for the report, @ubun2Junky. We definitely need to address this issue. It is deeply embedded in many queries.

On our Steering Committee call this morning we decided to add a note about the issue with MySQL 5.7 and your fix about the ONLY_FULL_GROUP_BY setting for those who need to run this version into the Release Notes for 3.0. We'll also prioritize the fix and put out a 3.1 release as soon as we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment