r83295 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83294‎ | r83295 | r83296 >
Date:16:09, 5 March 2011
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Don't dupe/drop parts of searchindex on SQLite
Modified paths:
  • /trunk/phase3/tests/phpunit/MediaWikiTestCase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
@@ -200,6 +200,15 @@
201201
202202 $tables = $this->db->listTables( $wgDBprefix, __METHOD__ );
203203 $tables = array_map( array( __CLASS__, 'unprefixTable' ), $tables );
 204+
 205+ if ( $this->db->getType() == 'sqlite' ) {
 206+ $tables = array_flip( $tables );
 207+ // these are subtables of searchindex and don't need to be duped/dropped separately
 208+ unset( $tables['searchindex_content'] );
 209+ unset( $tables['searchindex_segdir'] );
 210+ unset( $tables['searchindex_segments'] );
 211+ $tables = array_flip( $tables );
 212+ }
204213 return $tables;
205214
206215 }

Comments

#Comment by Platonides (talk | contribs)   16:25, 19 March 2011

What about haivng an array of tables to not duplicate/drop and then doing array_diff() ?

Status & tagging log