From: Brion Vibber Date: Sat, 24 Sep 2005 03:44:54 +0000 (+0000) Subject: * (bug 3182) Clear link cache during import to prevent memory leak X-Git-Tag: 1.6.0~1586 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=316945a6339230a7dc1db130261686c8c8ebf555;p=lhc%2Fweb%2Fwiklou.git * (bug 3182) Clear link cache during import to prevent memory leak --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 72bc19d27b..c59eddb2d7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -118,6 +118,7 @@ fully support the editing toolbar, but was found to be too confusing. by default when 'watchdefault' option is on * Skip update of disused 'rc_cur_time' field (todo: discard the field) * (bug 3506) Avoid MySQL error when Listusers returns no results +* (bug 3182) Clear link cache during import to prevent memory leak === Caveats === diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index 5a7db20180..c36b48bb70 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -197,6 +197,10 @@ class WikiRevision { $userText = $this->getUser(); } + // avoid memory leak...? + global $wgLinkCache; + $wgLinkCache->clear(); + $article = new Article( $this->title ); $pageId = $article->getId(); if( $pageId == 0 ) { diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 15110ffd21..3a58550c6b 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -45,6 +45,7 @@ class BackupReader { function handleRevision( $rev ) { $title = $rev->getTitle(); if (!$title) { + $this->progress( "Got bogus revision with null title!" ); return; } $display = $title->getPrefixedText();