On Tue, Jul 22, 2008 at 6:37 PM, vyznev@svn.wikimedia.org wrote:
Log Message:
Make Special:Recentchangeslinked display changes to transcluded pages (templatelinks table) and embedded images (imagelinks table). This should help a bit against the recent spate of template vandalism on enwiki. Also make the "Show changes to pages linked" button work for categories.
Remaining issues / things to do:
- Test performance of the UNION query on a larger dataset than my test wiki.
- Add some checkboxes to allow filtering the results like on Special:Whatlinkshere.
- Try to think of some way to make the behavior for categories less klugy.
. . .
// need to resort and relimit after union
$sql = "(" . implode( ") UNION (", $subsql ) . ") ORDER BY rc_timestamp DESC LIMIT {$limit}";
Does this actually work in MySQL 4? I think you need to retrieve them all and do the ordering in PHP, the way it's done in WhatLinksHere.
Simetrical wrote:
On Tue, Jul 22, 2008 at 6:37 PM, vyznev@svn.wikimedia.org wrote:
Log Message:
Make Special:Recentchangeslinked display changes to transcluded pages (templatelinks table) and embedded images (imagelinks table). This should help a bit against the recent spate of template vandalism on enwiki. Also make the "Show changes to pages linked" button work for categories.
Remaining issues / things to do:
- Test performance of the UNION query on a larger dataset than my test wiki.
- Add some checkboxes to allow filtering the results like on Special:Whatlinkshere.
- Try to think of some way to make the behavior for categories less klugy.
. . .
// need to resort and relimit after union
$sql = "(" . implode( ") UNION (", $subsql ) . ") ORDER BY rc_timestamp DESC LIMIT {$limit}";
Does this actually work in MySQL 4? I think you need to retrieve them all and do the ordering in PHP, the way it's done in WhatLinksHere.
Well, Special:RecentChanges already uses a similar trick (grep for "($sqlNew) UNION ($sqlOld)"), so I assumed it works. Haven't actually tested it on MySQL 4, though.
Ilmari Karonen wrote:
Simetrical wrote:
On Tue, Jul 22, 2008 at 6:37 PM, vyznev@svn.wikimedia.org wrote:
// need to resort and relimit after union
$sql = "(" . implode( ") UNION (", $subsql ) . ") ORDER BY rc_timestamp DESC LIMIT {$limit}";
Does this actually work in MySQL 4? I think you need to retrieve them all and do the ordering in PHP, the way it's done in WhatLinksHere.
Well, Special:RecentChanges already uses a similar trick (grep for "($sqlNew) UNION ($sqlOld)"), so I assumed it works. Haven't actually tested it on MySQL 4, though.
Just dug through the history, and the use of "UNION" in Recentchanges goes back to r34710 committed by aaron on May 13. So I suppose it may have been broken since then, but it sounds unlikely.
On Tue, Jul 22, 2008 at 7:05 PM, Ilmari Karonen nospam@vyznev.net wrote:
Well, Special:RecentChanges already uses a similar trick (grep for "($sqlNew) UNION ($sqlOld)"), so I assumed it works. Haven't actually tested it on MySQL 4, though.
Yes, you're right. I recall something similar being reverted for not working on MySQL 4, but that may have had an extra set of parentheses or something. Obviously this works if it's been in RC for months. (Why doesn't WhatLinksHere do it, I wonder? It would clean up the code a lot.)
wikitech-l@lists.wikimedia.org