#809698: don't use the double-pipe operator, which is not consistently supported by database engines. From: Damien Tournoud --- simpletest/tests/database_test.test | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git modules/simpletest/tests/database_test.test modules/simpletest/tests/database_test.test index 492f3b7..d25a42b 100644 --- modules/simpletest/tests/database_test.test +++ modules/simpletest/tests/database_test.test @@ -2703,11 +2703,11 @@ class DatabaseTemporaryQueryTestCase extends DrupalWebTestCase { * across multiple kinds of database systems, we test that the * database system interprets SQL syntax in an expected fashion. */ -class DatabaseAnsiSyntaxTestCase extends DatabaseTestCase { +class DatabaseBasicSyntaxTestCase extends DatabaseTestCase { public static function getInfo() { return array( - 'name' => 'ANSI SQL syntax tests', - 'description' => 'Test ANSI SQL syntax interpretation.', + 'name' => 'Basic SQL syntax tests', + 'description' => 'Test SQL syntax interpretation.', 'group' => 'Database', ); } @@ -2720,27 +2720,27 @@ class DatabaseAnsiSyntaxTestCase extends DatabaseTestCase { * Test for ANSI string concatenation. */ function testBasicConcat() { - $result = db_query('SELECT :a1 || :a2 || :a3 || :a4 || :a5', array( + $result = db_query('SELECT CONCAT(:a1, CONCAT(:a2, CONCAT(:a3, CONCAT(:a4, :a5))))', array( ':a1' => 'This', ':a2' => ' ', ':a3' => 'is', ':a4' => ' a ', ':a5' => 'test.', )); - $this->assertIdentical($result->fetchField(), 'This is a test.', t('Basic ANSI Concat works.')); + $this->assertIdentical($result->fetchField(), 'This is a test.', t('Basic CONCAT works.')); } /** * Test for ANSI string concatenation with field values. */ function testFieldConcat() { - $result = db_query('SELECT :a1 || name || :a2 || age || :a3 FROM {test} WHERE age = :age', array( + $result = db_query('SELECT CONCAT(:a1, CONCAT(name, CONCAT(:a2, CONCAT(age, :a3)))) FROM {test} WHERE age = :age', array( ':a1' => 'The age of ', ':a2' => ' is ', ':a3' => '.', ':age' => 25, )); - $this->assertIdentical($result->fetchField(), 'The age of John is 25.', t('Field ANSI Concat works.')); + $this->assertIdentical($result->fetchField(), 'The age of John is 25.', t('Field CONCAT works.')); } /**