From b11cd099bbf0b2085d139ecf56b5f64097f1e7a2 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Sat, 5 Mar 2011 16:09:10 +0000 Subject: [PATCH] Don't dupe/drop parts of searchindex on SQLite --- tests/phpunit/MediaWikiTestCase.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index 4119482783..08f9323831 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -200,6 +200,15 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { $tables = $this->db->listTables( $wgDBprefix, __METHOD__ ); $tables = array_map( array( __CLASS__, 'unprefixTable' ), $tables ); + + if ( $this->db->getType() == 'sqlite' ) { + $tables = array_flip( $tables ); + // these are subtables of searchindex and don't need to be duped/dropped separately + unset( $tables['searchindex_content'] ); + unset( $tables['searchindex_segdir'] ); + unset( $tables['searchindex_segments'] ); + $tables = array_flip( $tables ); + } return $tables; } -- 2.20.1