r89761 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89760‎ | r89761 | r89762 >
Date:08:43, 9 June 2011
Author:freakolowsky
Status:ok
Tags:
Comment:
* merge r89759 from REL1_17 into trunk
* changed addQuotes expected result for addQuotes in DatabaseTest
Modified paths:
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/db/DatabaseTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/db/DatabaseTest.php
@@ -12,7 +12,7 @@
1313
1414 function testAddQuotesNull() {
1515 $check = "NULL";
16 - if ( $this->db->getType() === 'sqlite' ) {
 16+ if ( $this->db->getType() === 'sqlite' || $this->db->getType() === 'oracle' ) {
1717 $check = "''";
1818 }
1919 $this->assertEquals( $check, $this->db->addQuotes( null ) );
Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -930,9 +930,9 @@
931931 */
932932 function tableExists( $table ) {
933933 $table = $this->tableName( $table );
934 - $table = strtoupper( $this->removeIdentifierQuotes( $table ) );
935 - $owner = strtoupper( $this->mDBname );
936 - $SQL = "SELECT 1 FROM all_tables WHERE owner='$owner' AND table_name='$table'";
 934+ $table = $this->addQuotes( strtoupper( $this->removeIdentifierQuotes( $table ) ) );
 935+ $owner = $this->addQuotes( strtoupper( $this->mDBname ) );
 936+ $SQL = "SELECT 1 FROM all_tables WHERE owner=$owner AND table_name=$table";
937937 $res = $this->doQuery( $SQL );
938938 if ( $res ) {
939939 $count = $res->numRows();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89759* wrapped table and dbname with addQuotesfreakolowsky07:15, 9 June 2011

Status & tagging log