Last modified: 2010-09-06 20:24:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27084, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25084 - Update FlaggedRevs for new categorylinks schema
Update FlaggedRevs for new categorylinks schema
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
FlaggedRevs (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Aaron Schulz
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-06 18:27 UTC by Aryeh Gregor (not reading bugmail, please e-mail directly)
Modified: 2010-09-06 20:24 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-09-06 18:27:42 UTC
FlaggedRevs uses cl_sortkey, so it might be broken by the categorylinks changes <http://lists.wikimedia.org/pipermail/wikitech-l/2010-July/048399.html>.  I looked at the code and wasn't immediately sure what it was doing, so I wasn't sure how to fix it.  If someone who knows more about FlaggedRevs could either fix it or say what needs to be done or say what FlaggedRevs uses categorylinks for, please do.

Important changes are:

1) The (cl_to, cl_sortkey, cl_from) index was changed to (cl_to, cl_type, cl_sortkey, cl_from).  This means that SELECT ... WHERE cl_to = 'Foo' ORDER BY cl_sortkey; will cause a filesort.  It would need to be changed to ORDER BY cl_type, cl_sortkey, or have AND cl_type = 'page' added, or something.  (cl_type is a new ENUM equal to either 'page', 'subcat', or 'file' depending on the namespace of cl_from.)  Likewise if you have offsets, those would need to include cl_type too to use the index properly.

2) cl_sortkey is now a binary string, at least in principle.  Right now it's mostly text but could have embedded nulls; in the future it will likely be changed to pure binary sortkeys generated by CLDR or something.  If you're printing these or anything, don't.

Possibly no changes are needed, I'm not sure.
Comment 1 Chad H. 2010-09-06 20:24:33 UTC
(In reply to comment #0) 
> 1) The (cl_to, cl_sortkey, cl_from) index was changed to (cl_to, cl_type,
> cl_sortkey, cl_from).  This means that SELECT ... WHERE cl_to = 'Foo' ORDER BY
> cl_sortkey; will cause a filesort.  It would need to be changed to ORDER BY
> cl_type, cl_sortkey, or have AND cl_type = 'page' added, or something. 
> (cl_type is a new ENUM equal to either 'page', 'subcat', or 'file' depending on
> the namespace of cl_from.)  Likewise if you have offsets, those would need to
> include cl_type too to use the index properly.
> 

We only use the sortkey in two places. One of them isn't affected. The second was, and is fixed in r72509.

> 2) cl_sortkey is now a binary string, at least in principle.  Right now it's
> mostly text but could have embedded nulls; in the future it will likely be
> changed to pure binary sortkeys generated by CLDR or something.  If you're
> printing these or anything, don't.
> 

We don't :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links