r79376 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79375‎ | r79376 | r79377 >
Date:21:51, 31 December 2010
Author:soxred93
Status:ok
Tags:
Comment:
For some reason tableExists() is being unreliable, which is resulting in tables not being dropped that _should_ be dropped. Drop them anyway and ignore the errors.
Modified paths:
  • /trunk/phase3/tests/phpunit/MediaWikiTestCase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
@@ -144,9 +144,10 @@
145145 }
146146
147147 foreach ( $tables as $table ) {
148 - if( $this->db->tableExists( "`$table`" ) ) {
 148+ try {
149149 $sql = $this->db->getType() == 'oracle' ? "DROP TABLE $table DROP CONSTRAINTS" : "DROP TABLE `$table`";
150150 $this->db->query( $sql, __METHOD__ );
 151+ } catch( Exception $e ) {
151152 }
152153 }
153154

Status & tagging log