diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-12-23 07:48:24 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-12-23 07:48:24 +0000 |
commit | 1c0f4ac3aa513701837cfbc3829d3eb242dcc525 (patch) | |
tree | bb2d197be74bfb4a1ae43a2112e4a8fb68f45f77 /includes/database/mysql | |
parent | 6303ecb8c813f8e52efeeafd943b8b23679140d9 (diff) | |
download | brdo-1c0f4ac3aa513701837cfbc3829d3eb242dcc525.tar.gz brdo-1c0f4ac3aa513701837cfbc3829d3eb242dcc525.tar.bz2 |
- Patch #344575 by cdale et al: force MySQL to run in ANSI compatibility mode. Comes with tests.
Diffstat (limited to 'includes/database/mysql')
-rw-r--r-- | includes/database/mysql/database.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/database/mysql/database.inc b/includes/database/mysql/database.inc index 9a9c57082..b7043dd15 100644 --- a/includes/database/mysql/database.inc +++ b/includes/database/mysql/database.inc @@ -35,9 +35,12 @@ class DatabaseConnection_mysql extends DatabaseConnection { // Force MySQL to use the UTF-8 character set by default. $this->exec('SET NAMES "utf8"'); - // Enable MySQL's "strict mode", which removes most of MySQL's - // "just be lazy" behaviors that end up causing more trouble than they're worth. - $this->exec('SET sql_mode=STRICT_ALL_TABLES'); + // Force MySQL's behavior to conform more closely to SQL standards. + // 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 disscussion. + $this->exec("SET sql_mode='ANSI,TRADITIONAL,ONLY_FULL_GROUP_BY'"); } public function queryRange($query, array $args, $from, $count, array $options = array()) { |