From 9f4da9f177ea25bf5d912156d167c5f1f1aa251e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Thu, 28 Jun 2018 18:33:50 +0200 Subject: [PATCH] Fix table locking in WikiPage::doDeleteArticleReal This reverts a recent change that caused the table array and the join array to have mismatching keys, so that the select was a cartesian product of page and revision_comment_temp (ie. any page deletion locked the whole revision_comment_temp table). Bug: T198350 Change-Id: Ifb6f0409d4f210d3ecb1da03f59aaba7e229e89e --- includes/page/WikiPage.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index b97082084d..18ecff42b3 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2527,17 +2527,9 @@ class WikiPage implements Page, IDBAccessObject { // Note array_intersect() preserves keys from the first arg, and we're // assuming $revQuery has `revision` primary and isn't using subtables // for anything we care about. - $tablesFlat = []; - array_walk_recursive( - $revQuery['tables'], - function ( $a ) use ( &$tablesFlat ) { - $tablesFlat[] = $a; - } - ); - $res = $dbw->select( array_intersect( - $tablesFlat, + $revQuery['tables'], [ 'revision', 'revision_comment_temp', 'revision_actor_temp' ] ), '1', -- 2.20.1