From 62cc9a66a478dba8b823e87e92a7932281c6882b Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 19 Oct 2007 20:53:01 +0000 Subject: [PATCH] Revert 26830, which 1) completely breaks recentchangeslinked for logged-in users (error in LEFT JOIN condition probably due to mixed join syntaxes), and 2) will cause any moderate-sized database to spontaneously combust (over a minute to run the query on an old Simple English database before I killed it) due to Cartesian join of page and redirect tables. --- RELEASE-NOTES | 1 - includes/SpecialRecentchangeslinked.php | 16 +++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 063d7ab3d4..d6bed90341 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -39,7 +39,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN against the previous revision, whether currently deleted or live. * Added tooltips for the "Go" and "Search" buttons * (bug 11649) Show input form when Special:Whatlinkshere has no parameters -* Show changes to pages linked to via a redirect on Special:Recentchangeslinked === Bug fixes in 1.12 === diff --git a/includes/SpecialRecentchangeslinked.php b/includes/SpecialRecentchangeslinked.php index f1536e6a70..2a8ac32d1a 100644 --- a/includes/SpecialRecentchangeslinked.php +++ b/includes/SpecialRecentchangeslinked.php @@ -60,8 +60,8 @@ function wfSpecialRecentchangeslinked( $par = NULL ) { $cmq = 'AND rc_minor=0'; } else { $cmq = ''; } - list($recentchanges, $categorylinks, $pagelinks, $watchlist, $redirect, $page) = - $dbr->tableNamesN( 'recentchanges', 'categorylinks', 'pagelinks', "watchlist", "redirect", "page" ); + list($recentchanges, $categorylinks, $pagelinks, $watchlist) = + $dbr->tableNamesN( 'recentchanges', 'categorylinks', 'pagelinks', "watchlist" ); $uid = $wgUser->getID(); @@ -126,19 +126,13 @@ $GROUPBY rc_new_len, rc_deleted " . ($uid ? ",wl_user" : "") . " - FROM $pagelinks, $recentchanges, $redirect, $page + FROM $pagelinks, $recentchanges " . ($uid ? " LEFT OUTER JOIN $watchlist ON wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace " : "") . " WHERE rc_timestamp > '{$cutoff}' {$cmq} - AND (pl_namespace=rc_namespace + AND pl_namespace=rc_namespace AND pl_title=rc_title - AND pl_from=$id) - OR (rd_namespace=rc_namespace - AND rd_title=rc_title - AND rd_from=page_id - AND page_namespace=pl_namespace - AND page_title=pl_title - AND pl_from=$id) + AND pl_from=$id $GROUPBY "; } -- 2.20.1