http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89761

Revision: 89761
Author:   freakolowsky
Date:     2011-06-09 08:43:53 +0000 (Thu, 09 Jun 2011)
Log Message:
-----------
* merge r89759 from REL1_17 into trunk
* changed addQuotes expected result for addQuotes in DatabaseTest

Modified Paths:
--------------
    trunk/phase3/includes/db/DatabaseOracle.php
    trunk/phase3/tests/phpunit/includes/db/DatabaseTest.php

Modified: trunk/phase3/includes/db/DatabaseOracle.php
===================================================================
--- trunk/phase3/includes/db/DatabaseOracle.php 2011-06-09 08:32:21 UTC (rev 
89760)
+++ trunk/phase3/includes/db/DatabaseOracle.php 2011-06-09 08:43:53 UTC (rev 
89761)
@@ -930,9 +930,9 @@
         */
        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();

Modified: trunk/phase3/tests/phpunit/includes/db/DatabaseTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/db/DatabaseTest.php     2011-06-09 
08:32:21 UTC (rev 89760)
+++ trunk/phase3/tests/phpunit/includes/db/DatabaseTest.php     2011-06-09 
08:43:53 UTC (rev 89761)
@@ -12,7 +12,7 @@
 
        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 ) );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to