From: Gergő Tisza Date: Thu, 28 Jun 2018 16:33:50 +0000 (+0200) Subject: Fix table locking in WikiPage::doDeleteArticleReal X-Git-Tag: 1.34.0-rc.0~4930^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=9f4da9f177ea25bf5d912156d167c5f1f1aa251e;p=lhc%2Fweb%2Fwiklou.git 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 --- 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',