diff --git a/lib/Doctrine/ConnectionFactory.php b/lib/Doctrine/ConnectionFactory.php index 8e97d817ca..351e6c90d3 100644 --- a/lib/Doctrine/ConnectionFactory.php +++ b/lib/Doctrine/ConnectionFactory.php @@ -55,6 +55,7 @@ class ConnectionFactory { private function getDriverOptions($timezoneOffset, $charset, $collation) { $driverOptions = [ "@@session.time_zone = '$timezoneOffset'", + '@@session.sql_mode = REPLACE(@@sql_mode, "ONLY_FULL_GROUP_BY", "")', // This is needed because ONLY_FULL_GROUP_BY mode in MariaDB is much more restrictive than in MySQL // We need to use CONVERT for MySQL 8, Maria DB bug which triggers #1232 - Incorrect argument type to variable 'wait_timeout` // https://stackoverflow.com/questions/35187378/mariadb-type-error-when-setting-session-variable "@@session.wait_timeout = GREATEST(CONVERT(COALESCE(@@wait_timeout, 0), SIGNED), $this->minWaitTimeout)",