Last modified: 2009-12-11 15:48:06 UTC
The API is returning empty results for list=usercontribs on Wikimedia sites. Example: http://en.wikipedia.org/w/api.php?action=query&list=usercontribs&ucuser=Gurch
Tested locally with wmf-deployment branch, works fine. Server admin log for December 11 has: # 01:26 logmsgbot: midom synchronized php-1.5/includes/api/ApiQueryUserContributions.php # 00:37 Tim: killed long-running (34ks) API contributions query on db12, apparently filled up /a/tmp which would be about when the problem started. Either the change is buggy or disabling the query was the intention, if the latter can it at least give an error message rather than blank output, it's breaking various tools.
Created attachment 6871 [details] Proposed fix: Add check for empty 'ucuser=' parameter to ApiQueryUserContributions.php I suspect this may be the reason why it has been disabled: api.php?action=query&list=ucercontribs&user= results in SELECT /* ApiQueryContributions::execute 127.0.0.1 */ rev_timestamp,page_namespace,page_title,rev_user_text,rev_deleted,rev_page,rev_id,page_latest,rev_comment,rev_len,rev_minor_edit,rev_parent_id FROM `page`,`revision` FORCE INDEX (usertext_timestamp) WHERE (page_id=rev_page) AND ((rev_deleted & 4) = 0) ORDER BY rev_timestamp DESC LIMIT 11 which will filesort the entire revision table due to the missing 'rev_user_text'-condition.
(In reply to comment #2) > Created an attachment (id=6871) [details] > Proposed fix: Add check for empty 'ucuser=' parameter to > ApiQueryUserContributions.php > Domas applied this patch as a live hack, and I committed it to trunk in r59953.