diff options
-rw-r--r-- | CHANGELOG.txt | 3 | ||||
-rw-r--r-- | includes/database/mysql/database.inc | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e7266a339..73d4bc2b7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,9 @@ Drupal 7.42, xxxx-xx-xx (development version) ----------------------- +- Improved MySQL 5.7 support by changing the MySQL database driver to stop + using the ANSI SQL mode alias, which has different meanings for different + MySQL versions. - Fixed a regression introduced in Drupal 7.39 which prevented autocomplete functionality from working on servers that are not configured to automatically recognize index.php. diff --git a/includes/database/mysql/database.inc b/includes/database/mysql/database.inc index fdf9271be..a96b053c0 100644 --- a/includes/database/mysql/database.inc +++ b/includes/database/mysql/database.inc @@ -81,7 +81,7 @@ class DatabaseConnection_mysql extends DatabaseConnection { 'init_commands' => array(), ); $connection_options['init_commands'] += array( - 'sql_mode' => "SET sql_mode = 'ANSI,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER'", + 'sql_mode' => "SET sql_mode = 'REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER'", ); // Execute initial commands. foreach ($connection_options['init_commands'] as $sql) { |