From: David Barratt Date: Thu, 1 Nov 2018 19:37:46 +0000 (-0400) Subject: BlockRestriction::update() unnecessarily does a SELECT on the page table. X-Git-Tag: 1.34.0-rc.0~3582 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=108710456829010aa666ab3241d52f22a974bed2;p=lhc%2Fweb%2Fwiklou.git BlockRestriction::update() unnecessarily does a SELECT on the page table. This unnecessary SELECT causes a performence issue where it takes an exceedingly long time to perform an update. Bug: T208526 Change-Id: I0238234146fc838067019351ea97046a7d37d6fc --- diff --git a/includes/block/BlockRestriction.php b/includes/block/BlockRestriction.php index 3ce682bdd4..43d70e6b1c 100644 --- a/includes/block/BlockRestriction.php +++ b/includes/block/BlockRestriction.php @@ -112,7 +112,7 @@ class BlockRestriction { $blockIds = array_keys( $restrictionList ); if ( !empty( $blockIds ) ) { $result = $dbw->select( - [ 'ipblocks_restrictions', 'page' ], + [ 'ipblocks_restrictions' ], [ 'ir_ipb_id', 'ir_type', 'ir_value' ], [ 'ir_ipb_id' => $blockIds ], __METHOD__,