-
Notifications
You must be signed in to change notification settings - Fork 4
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
ONLY_FULL_GROUP_BY error #8
Comments
Details: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'dcashion_os2.value.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /home/dcashion/metascripta.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112 Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'dcashion_os2.value.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /home/dcashion/metascripta.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18 Next Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT LOWER(MIN(value.value)) AS "identifier", MIN(value.resource_id) AS "id" FROM value value LEFT JOIN resource resource ON value.resource_id = resource.id WHERE (value.type = "literal") AND (value.property_id = ?) AND (resource.resource_type = ?) AND (value.value = ?) GROUP BY "identifier" ORDER BY "id" ASC, value.id ASC' with params [10, "Omeka\Entity\Item", "vtl_02619_01"]: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'dcashion_os2.value.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /home/dcashion/metascripta.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128 |
I'm hitting a similar error as @hxsllc when working with CleanUrl in combination with ARK identifiers in the My error:
Versions usedOmeka version: 3.2.0 To reproduce the error
To workaround the issue
FixIt seems like a bug that needs fixing. I will have a look when I have some time, but any hint in the proper direction would be welcome @Daniel-KM |
Omeka S encountered an error
Doctrine\DBAL\Exception\DriverException
An exception occurred while executing 'SELECT LOWER(MIN(value.value)) AS "identifier", MIN(value.resource_id) AS "id" FROM value value LEFT JOIN resource resource ON value.resource_id = resource.id WHERE (value.type = "literal") AND (value.property_id = ?) AND (resource.resource_type = ?) AND (value.value = ?) GROUP BY "identifier" ORDER BY "id" ASC, value.id ASC' with params [10, "Omeka\Entity\Item", "vtl_02619_01"]: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'dcashion_os2.value.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
From:
https://stackoverflow.com/questions/41887460/select-list-is-not-in-group-by-clause-and-contains-nonaggregated-column-inc/41887524
There is a system variable "ONLY_FULL_GROUP_BY" in MySql engine.
From Mysql Version 5.7.5 : ONLY_FULL_GROUP_BY SQL mode is enabled by default
Before Version 5.7.5 : ONLY_FULL_GROUP_BY was not enabled by default.
If the ONLY_FULL_GROUP_BY SQL mode is enabled (which it is by default from version 5.7.5), MySQL rejects queries for which the select list, HAVING condition, or ORDER BY list refer to non-aggregated columns that are neither named in the GROUP BY clause nor are functionally dependent on them.
The text was updated successfully, but these errors were encountered: