When starting the mariadb 10.6.8 docker container with
--sql-mode=ONLY_FULL_GROUP_BY
, it fails to initialize with
ERROR 1140 (42000) at line 2: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
Here a more complete docker run command that we use in Nextcloud server for testing:
docker run -it --rm \
--name mariadb \
-e MYSQL_ROOT_PASSWORD=owncloud \
-e MYSQL_USER=oc_autotest \
-e MYSQL_PASSWORD=owncloud \
-e MYSQL_DATABASE=oc_autotest \
ghcr.io/nextcloud/continuous-integration-mariadb-10.6:latest \
--sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
(The docker image is based on the official mariadb10.6.8 docker image and nothing is modified)