From 1113b1203cbc1049fb1d01e975ff9a531d72a408 Mon Sep 17 00:00:00 2001 From: "Ariel T. Glenn" Date: Tue, 23 Oct 2018 18:18:47 +0300 Subject: [PATCH] fix stubs dump query to use straight join regression from a combination of https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/380669/ and https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/459885/ We have to do a straight join for all stubs, since they all now order revisions by rev_id after deployment of the second patchset above. Bug: T207628 Change-Id: I4d2a311c14c66d4813eb9fc3c587fa3ddb958454 --- includes/export/WikiExporter.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/export/WikiExporter.php b/includes/export/WikiExporter.php index 1f2b81d3a8..32f75198bb 100644 --- a/includes/export/WikiExporter.php +++ b/includes/export/WikiExporter.php @@ -55,7 +55,7 @@ class WikiExporter { const TEXT = 0; const STUB = 1; - const BATCH_SIZE = 1000; + const BATCH_SIZE = 50000; /** @var int */ public $text; @@ -367,8 +367,9 @@ class WikiExporter { } elseif ( $this->history & self::FULL ) { # Full history dumps... # query optimization for history stub dumps - if ( $this->text == self::STUB && $orderRevs ) { + if ( $this->text == self::STUB ) { $tables = $revQuery['tables']; + $opts[] = 'STRAIGHT_JOIN'; $opts['USE INDEX']['revision'] = 'rev_page_id'; unset( $join['revision'] ); $join['page'] = [ 'INNER JOIN', 'rev_page=page_id' ]; -- 2.20.1