diff --git a/lib/Doctrine/ConnectionFactory.php b/lib/Doctrine/ConnectionFactory.php index f711a57e0d..0f13df2d4b 100644 --- a/lib/Doctrine/ConnectionFactory.php +++ b/lib/Doctrine/ConnectionFactory.php @@ -59,7 +59,10 @@ 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 + "@@session.sql_mode = REPLACE( + REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''), + 'ANSI_QUOTES', '' + )", // 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)",