From: Jure Kajzer Date: Thu, 9 Jun 2011 08:43:53 +0000 (+0000) Subject: * merge r89759 from REL1_17 into trunk X-Git-Tag: 1.31.0-rc.0~29611 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=edd10806bc28fe415e34dd0134c4e821a58a435f;p=lhc%2Fweb%2Fwiklou.git * merge r89759 from REL1_17 into trunk * changed addQuotes expected result for addQuotes in DatabaseTest --- diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index b298545821..22aa7ce110 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -930,9 +930,9 @@ class DatabaseOracle extends DatabaseBase { */ function tableExists( $table ) { $table = $this->tableName( $table ); - $table = strtoupper( $this->removeIdentifierQuotes( $table ) ); - $owner = strtoupper( $this->mDBname ); - $SQL = "SELECT 1 FROM all_tables WHERE owner='$owner' AND table_name='$table'"; + $table = $this->addQuotes( strtoupper( $this->removeIdentifierQuotes( $table ) ) ); + $owner = $this->addQuotes( strtoupper( $this->mDBname ) ); + $SQL = "SELECT 1 FROM all_tables WHERE owner=$owner AND table_name=$table"; $res = $this->doQuery( $SQL ); if ( $res ) { $count = $res->numRows(); diff --git a/tests/phpunit/includes/db/DatabaseTest.php b/tests/phpunit/includes/db/DatabaseTest.php index e886fa87c9..6de510ad96 100644 --- a/tests/phpunit/includes/db/DatabaseTest.php +++ b/tests/phpunit/includes/db/DatabaseTest.php @@ -12,7 +12,7 @@ class DatabaseTest extends MediaWikiTestCase { function testAddQuotesNull() { $check = "NULL"; - if ( $this->db->getType() === 'sqlite' ) { + if ( $this->db->getType() === 'sqlite' || $this->db->getType() === 'oracle' ) { $check = "''"; } $this->assertEquals( $check, $this->db->addQuotes( null ) );