Index: includes/database/mysql/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/mysql/database.inc,v
retrieving revision 1.11
diff -u -p -r1.11 database.inc
--- includes/database/mysql/database.inc	8 Dec 2008 21:41:53 -0000	1.11
+++ includes/database/mysql/database.inc	9 Dec 2008 02:48:23 -0000
@@ -37,7 +37,7 @@ class DatabaseConnection_mysql extends D
 
     // 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');
+    $this->exec("SET sql_mode='ANSI,TRADITIONAL'");
   }
 
   public function queryRange($query, array $args, $from, $count, array $options = array()) {
Index: modules/simpletest/tests/database_test.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/database_test.test,v
retrieving revision 1.25
diff -u -p -r1.25 database_test.test
--- modules/simpletest/tests/database_test.test	8 Dec 2008 22:02:45 -0000	1.25
+++ modules/simpletest/tests/database_test.test	9 Dec 2008 02:48:24 -0000
@@ -1856,3 +1856,27 @@ class DatabaseTemporaryQueryTestCase ext
     $this->assertFalse(db_table_exists('temporary'), t('The temporary table is, indeed, temporary.'));
   }
 }
+
+/**
+ * Tests string concatenation of the DBA is ANSI compatible.
+ */
+class DatabaseANSIConcatTestCase extends DatabaseTestCase {
+
+  function getInfo() {
+    return array(
+      'name' => t('ANSI Concat tests'),
+      'description' => t('Test ANSI string concatenation.'),
+      'group' => t('Database'),
+    );
+  }
+
+  /**
+   * Test a concat without reading a table.
+   */
+  function testBasicConcat() {
+    $result = db_query("SELECT 'This' || ' ' || 'is' || ' a ' || 'test.'");
+    $column = $result->fetchCol();
+    $this->assertIdentical($column[0], 'This is a test.', t('ANSI Concat works.'));
+  }
+}
+
