addon_migration_tool icon indicating copy to clipboard operation
addon_migration_tool copied to clipboard

Database Exception with sql_mode=only_full_group_by

Open JeRoNZ opened this issue 5 years ago • 0 comments

index.php/dashboard/system/migration/import/map_content/5784e147-9594-11ea-ad29-001cc4dbb7c6

threw this exception:

An exception occurred while executing 'SELECT DISTINCT m0_.id AS id_0, m0_.type AS type_1, m0_.name AS name_2, m0_.custom_template AS custom_template_3, m0_.position AS position_4, m0_.defaults_output_identifier AS defaults_output_identifier_5, m0_.value_type AS value_type_6, m0_.block_value_id AS block_value_id_7, m0_.style_set_id AS style_set_id_8, m0_.area_id AS area_id_9 FROM MigrationImportBlocks m0_ WHERE m0_.value_type IN ('block') GROUP BY m0_.type ORDER BY m0_.type ASC': SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'jero.m0_.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

If I do this

set global sql_mode='';

in the MySQL command line, it resolves the issue temporarily.

This is using Ubuntu 18.04LTS and MySQL 5.7.30-0ubuntu0.18.04.1 (Ubuntu) PHP 7.2

JeRoNZ avatar May 14 '20 21:05 JeRoNZ