summaryrefslogtreecommitdiffstatshomepage
path: root/includes/database
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-08-12 09:18:10 -0400
committerDries Buytaert <dries@buytaert.net>2011-08-12 09:18:10 -0400
commitf8fc9a18a0fb852a056128d580b6edb379b513cf (patch)
tree6d067cc8e9568b4e67507fdaa3d07d28ac5419d5 /includes/database
parent9764f077833f6d920f662148df8e83085dd24f69 (diff)
downloaddrupal-f8fc9a18a0fb852a056128d580b6edb379b513cf.tar.gz
drupal-f8fc9a18a0fb852a056128d580b6edb379b513cf.zip
- Patch #1136854 by chx: Fixed MySQL 5.5 breaks speedy testing.
Diffstat (limited to 'includes/database')
-rw-r--r--includes/database/mysql/database.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/database/mysql/database.inc b/includes/database/mysql/database.inc
index 0d9158789bb..7d5d85998db 100644
--- a/includes/database/mysql/database.inc
+++ b/includes/database/mysql/database.inc
@@ -60,8 +60,10 @@ class DatabaseConnection_mysql extends DatabaseConnection {
// This allows Drupal to run almost seamlessly on many different
// kinds of database systems. These settings force MySQL to behave
// the same as postgresql, or sqlite in regards to syntax interpretation
- // and invalid data handling. See http://drupal.org/node/344575 for further discussion.
- $this->exec("SET sql_mode='ANSI,TRADITIONAL'");
+ // and invalid data handling. See http://drupal.org/node/344575 for
+ // further discussion. Also, as MySQL 5.5 changed the meaning of
+ // TRADITIONAL we need to spell out the modes one by one.
+ $this->exec("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'");
}
public function queryRange($query, $from, $count, array $args = array(), array $options = array()) {