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

Revision: 100933
Author:   aaron
Date:     2011-10-27 01:44:58 +0000 (Thu, 27 Oct 2011)
Log Message:
-----------
Quick and ugly fix to stop installs with CACHE_DB from immediately failing with 
DB errors. Something is wonked with the order of temp table creation.

Modified Paths:
--------------
    trunk/phase3/tests/parser/parserTest.inc

Modified: trunk/phase3/tests/parser/parserTest.inc
===================================================================
--- trunk/phase3/tests/parser/parserTest.inc    2011-10-27 01:36:57 UTC (rev 
100932)
+++ trunk/phase3/tests/parser/parserTest.inc    2011-10-27 01:44:58 UTC (rev 
100933)
@@ -136,7 +136,8 @@
                        $wgUser, $wgLang, $wgOut, $wgRequest, 
$wgStyleDirectory, $wgEnableParserCache,
                        $wgNamespaceAliases, $wgNamespaceProtection, 
$wgLocalFileRepo,
                        $parserMemc, $wgThumbnailScriptPath, $wgScriptPath,
-                       $wgArticlePath, $wgStyleSheetPath, $wgScript, 
$wgStylePath, $wgExtensionAssetsPath;
+                       $wgArticlePath, $wgStyleSheetPath, $wgScript, 
$wgStylePath, $wgExtensionAssetsPath,
+                       $wgMainCacheType, $wgMessageCacheType, 
$wgParserCacheType;
 
                $wgScript = '/index.php';
                $wgScriptPath = '/';
@@ -158,10 +159,20 @@
                $wgNamespaceAliases['Image'] = NS_FILE;
                $wgNamespaceAliases['Image_talk'] = NS_FILE_TALK;
 
+               // XXX: tests won't run without this (for CACHE_DB)
+               if ( $wgMainCacheType === CACHE_DB ) {
+                       $wgMainCacheType = CACHE_NONE;
+               }
+               if ( $wgMessageCacheType === CACHE_DB ) {
+                       $wgMessageCacheType = CACHE_NONE;
+               }
+               if ( $wgParserCacheType === CACHE_DB ) {
+                       $wgParserCacheType = CACHE_NONE;
+               }
 
                $wgEnableParserCache = false;
                DeferredUpdates::clearPendingUpdates();
-               $wgMemc = wfGetMainCache();
+               $wgMemc = wfGetMainCache(); // checks $wgMainCacheType
                $messageMemc = wfGetMessageCacheStorage();
                $parserMemc = wfGetParserCacheStorage();
 


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to