diff options
author | David Rothstein <drothstein@gmail.com> | 2016-02-01 11:03:17 -0500 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2016-02-01 11:03:17 -0500 |
commit | d641314cc6157d7b164ccc2587f7b9eb4f568c1f (patch) | |
tree | c7fc528dd96907afd7d80094caac511f674cdc2e | |
parent | f0b44bd9934251f383a0dc14920b71a52b40bec6 (diff) | |
download | brdo-d641314cc6157d7b164ccc2587f7b9eb4f568c1f.tar.gz brdo-d641314cc6157d7b164ccc2587f7b9eb4f568c1f.tar.bz2 |
Issue #2545480 by gryp, morgantocker, Crell, kevinquillen: Don't use the ANSI SQL mode since it has different meanings for different MySQL versions (and breaks MySQL 5.7 support in Drupal 7)
-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) { |