DbConnection: do not fail for MySQL 8

fixes #3611
This commit is contained in:
Thomas Gelf 2018-11-08 11:11:37 +01:00
parent aed2e54834
commit b4afdf4115
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ class DbConnection implements Selectable, Extensible, Updatable, Reducible, Insp
*/
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] =
'SET SESSION SQL_MODE=\'STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,'
. 'NO_AUTO_CREATE_USER,ANSI_QUOTES,PIPES_AS_CONCAT,NO_ENGINE_SUBSTITUTION\'';
. 'ANSI_QUOTES,PIPES_AS_CONCAT,NO_ENGINE_SUBSTITUTION\'';
if (isset($adapterParamaters['charset'])) {
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', NAMES ' . $adapterParamaters['charset'];
unset($adapterParamaters['charset']);