From 108710456829010aa666ab3241d52f22a974bed2 Mon Sep 17 00:00:00 2001 From: David Barratt Date: Thu, 1 Nov 2018 15:37:46 -0400 Subject: [PATCH] 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 --- includes/block/BlockRestriction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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__, -- 2.20.1