Last modified: 2010-09-01 16:47:43 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 T26166, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24166 - API error when using rvprop=tags
API error when using rvprop=tags
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.17.x
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
http://en.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-28 19:06 UTC by Derk-Jan Hartman
Modified: 2010-09-01 16:47 UTC (History)
4 users (show)

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


Attachments

Description Derk-Jan Hartman 2010-06-28 19:06:04 UTC
The api url returns:

#0 /usr/local/apache/common-local/wmf-deployment/includes/db/Database.php(541): DatabaseBase->reportQueryError('Unknown column ...', 1054, 'SELECT  rev_id,...', 'ApiQueryRevisio...', false)
#1 /usr/local/apache/common-local/wmf-deployment/includes/db/Database.php(877): DatabaseBase->query('SELECT  rev_id,...', 'ApiQueryRevisio...')
#2 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiQueryBase.php(233): DatabaseBase->select(Array, Array, Array, 'ApiQueryRevisio...', Array, Array)
#3 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiQueryRevisions.php(307): ApiQueryBase->select('ApiQueryRevisio...')
#4 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiQuery.php(224): ApiQueryRevisions->execute()
#5 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiMain.php(478): ApiQuery->execute()
#6 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiMain.php(267): ApiMain->executeAction()
#7 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiMain.php(251): ApiMain->executeActionWithErrorHandling()
#8 /usr/local/apache/common-local/wmf-deployment/api.php(116): ApiMain->execute()
#9 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#10 {main}

Pinpointed to the tags rvprop. "<RoanKattouw> It's probably forgetting to join something then"
Comment 1 Derk-Jan Hartman 2010-06-28 23:01:47 UTC
"<RoanKattouw> It's the MySQL 5 regression where SELECT * FROM foo, bar LEFT JOIN baz ON baz_id=foo_id breaks"
Comment 2 Sam Reed (reedy) 2010-08-28 00:14:30 UTC
http://192.168.0.190/w/api.php?action=query&prop=revisions&title=User:Tisane/Test1&rvprop=ids|flags|timestamp|user|size|comment|content|tags&revids=33

Query 6 (slave): SELECT /* ApiQueryRevisions::execute 192.168.0.133 */  rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,page_namespace,page_title,page_latest,ts_tags,old_id,old_text,old_flags  FROM `mw_page`,`mw_revision`,`mw_text` LEFT JOIN `mw_tag_summary` ON ((rev_id=ts_rev_id))  WHERE (page_id = rev_page) AND (rev_text_id=old_id) AND rev_id = '33'  ORDER BY rev_id LIMIT 2
SQL ERROR: Unknown column 'rev_id' in 'on clause' (localhost)
Comment 3 Sam Reed (reedy) 2010-09-01 16:35:15 UTC
SELECT   rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,page_namespace,page_title,page_latest,ts_tags,old_id,old_text,old_flags  FROM `mw_page`,`mw_revision` JOIN `mw_text` LEFT JOIN `mw_tag_summary` ON ((rev_id=ts_rev_id))  WHERE (page_id = rev_page) AND (rev_text_id=old_id) AND rev_id = '33'  ORDER BY rev_id LIMIT 2;

Fixes it

Per http://www.delphifaq.com/faq/databases/mysql/f1110.shtml

a join before the last table before the left join :/

Mmmm, Hax?
Comment 4 Sam Reed (reedy) 2010-09-01 16:47:43 UTC
r72116

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


Navigation
Links