From: Ariel T. Glenn Date: Tue, 23 Oct 2018 15:18:47 +0000 (+0300) Subject: fix stubs dump query to use straight join X-Git-Tag: 1.34.0-rc.0~3688 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=1113b1203cbc1049fb1d01e975ff9a531d72a408;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ];