From f634e51b76d429877d714043f796050b642b2511 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 27 Oct 2011 01:44:58 +0000 Subject: [PATCH] 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. --- tests/parser/parserTest.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 259fc2ffdc..2b52fb503a 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -136,7 +136,8 @@ class ParserTest { $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 @@ class ParserTest { $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(); -- 2.20.1