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
// 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',