From 172cfa589d408d61f3d096658aba296edbaf390a Mon Sep 17 00:00:00 2001 From: Jure Kajzer Date: Fri, 2 Sep 2011 06:58:08 +0000 Subject: [PATCH] * added redundand join condition for index usage as per comment on CR r88008 --- includes/specials/SpecialContributions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index ab01b1db6c..1d0eed74db 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -518,11 +518,11 @@ class ContribsPager extends ReverseChronologicalPager { $index = 'user_timestamp'; # @todo FIXME: Other groups may have 'bot' rights $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" ); - $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" ); + $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid AND rev_timestamp = rc_timestamp" ); } else { $tables = array( 'recentchanges', 'page', 'revision' ); $condition['rev_user_text'] = $this->target; - $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" ); + $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid AND rev_timestamp = rc_timestamp" ); $index = 'usertext_timestamp'; } if( $this->deletedOnly ) { -- 2.20.1