* merge r89759 from REL1_17 into trunk
authorJure Kajzer <freakolowsky@users.mediawiki.org>
Thu, 9 Jun 2011 08:43:53 +0000 (08:43 +0000)
committerJure Kajzer <freakolowsky@users.mediawiki.org>
Thu, 9 Jun 2011 08:43:53 +0000 (08:43 +0000)
* changed addQuotes expected result for addQuotes in DatabaseTest

includes/db/DatabaseOracle.php
tests/phpunit/includes/db/DatabaseTest.php

index b298545..22aa7ce 100644 (file)
@@ -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();
index e886fa8..6de510a 100644 (file)
@@ -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 ) );