r72509 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72508‎ | r72509 | r72510 >
Date:20:23, 6 September 2010
Author:demon
Status:ok (Comments)
Tags:
Comment:
(bug 25084) Update FlaggedRevs for new categorylinks schema. Add cl_type to the WHERE clause to skip the filesort
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php
@@ -270,6 +270,13 @@
271271 $fields[] = 'cl_sortkey';
272272 $conds['cl_to'] = $this->category;
273273 $conds[] = 'cl_from = page_id';
 274+ if( $this->namespace == NS_FILE ) {
 275+ $conds['cl_type'] = 'file';
 276+ } elseif( $this->namespace == NS_CATEGORY ) {
 277+ $conds['cl_type'] = 'subcat';
 278+ } else {
 279+ $conds['cl_type'] = 'page';
 280+ }
274281 $this->mIndexField = 'cl_sortkey';
275282 $useIndex = array( 'categorylinks' => 'cl_sortkey' );
276283 $groupBy = 'cl_sortkey,cl_from';

Follow-up revisions

RevisionCommit summaryAuthorDate
r76597Per CR on r76482, back out changes from r72509 and r74035, relies on core cha...demon21:23, 12 November 2010
r81671Back out the changes which depend on the categorylinks schema change, so that...tstarling00:57, 8 February 2011

Comments

#Comment by Simetrical (talk | contribs)   20:26, 6 September 2010

Thanks, this looks correct at a glance.

#Comment by 😂 (talk | contribs)   20:28, 6 September 2010

I verified the resulting queries with and without this change and it did indeed fix the filesort for me :)

Tagging as scaptrap though, shouldn't be merged to deployment until the sortkey-related fixes are pushed live.

#Comment by MZMcBride (talk | contribs)   21:26, 6 September 2010

I thought the categorylinks changes were still unreviewed.

#Comment by 😂 (talk | contribs)   21:33, 6 September 2010

Hence the scaptrap. And I remember a recent commit from Aryeh saying "per review by Tim," implying that it has been looked at.

#Comment by Simetrical (talk | contribs)   21:34, 6 September 2010

Yeah, Tim sent me review privately.

#Comment by MZMcBride (talk | contribs)   21:54, 6 September 2010

You're referring to r72308.

Status & tagging log