Last modified: 2010-05-15 16:03:29 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 T16526, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14526 - API Exception - internal_api_error_DBQueryError
API Exception - internal_api_error_DBQueryError
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.13.x
All All
: Highest critical (vote)
: ---
Assigned To: Bryan Tong Minh
http://en.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-13 12:52 UTC by Sam Reed (reedy)
Modified: 2010-05-15 16:03 UTC (History)
2 users (show)

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


Attachments

Description Sam Reed (reedy) 2008-06-13 12:52:45 UTC
Visiting the above link gives

<api>
−
<error code="internal_api_error_DBQueryError" info="Exception Caught: A database error has occurred
Query: SELECT  page_id,page_title,page_namespace,page_is_redirect,pl_title,pl_namespace  FROM `page`,`pagelinks`  WHERE (pl_from=page_id) AND ((pl_title = 'Twisday' AND pl_namespace = '0') OR (pl_title = 'Tiwes_dæg' AND pl_namespace = '0') OR (pl_title = 'Martis_dies' AND pl_namespace = '0') OR (pl_title = 'Tiu's_Day' AND pl_namespace = '0') OR (pl_title = 'Tuefday' AND pl_namespace = '0'))  ORDER BY pl_namespace, pl_title, pl_from LIMIT 501  
Function: ApiQueryBacklinks::run
Error: 1064 You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 's_Day' AND pl_namespace = '0') OR (pl_title = 'Tuefday' AND pl_ (10.0.0.236)
">


#0 /usr/local/apache/common-local/php-1.5/includes/Database.php(573): Database->reportQueryError('You have an err...', 1064, 'SELECT  page_id...', 'ApiQueryBacklin...', false)
#1 /usr/local/apache/common-local/php-1.5/includes/Database.php(982): Database->query('SELECT  page_id...', 'ApiQueryBacklin...')
#2 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryBase.php(214): Database->select(Array, Array, Array, 'ApiQueryBacklin...', Array, Array)
#3 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryBacklinks.php(202): ApiQueryBase->select('ApiQueryBacklin...')
#4 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryBacklinks.php(90): ApiQueryBacklinks->run()
#5 /usr/local/apache/common-local/php-1.5/includes/api/ApiQuery.php(211): ApiQueryBacklinks->execute()
#6 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(373): ApiQuery->execute()
#7 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(236): ApiMain->executeAction()
#8 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(220): ApiMain->executeActionWithErrorHandling()
#9 /usr/local/apache/common-local/php-1.5/api.php(77): ApiMain->execute()
#10 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#11 {main}

</error>
</api>


But is fine for other articles (ie Monday)
Comment 1 Sam Reed (reedy) 2008-06-13 12:56:06 UTC
Monday is fine, Tuesday is the erroring page listed above, Wednesday Errors, Thursday, Friday, Saturday and Sunday are all fine 

http://en.wikipedia.org/w/api.php?action=query&list=backlinks&bltitle=Wednesday&format=xml&bllimit=500&blredirect
Comment 2 Sam Reed (reedy) 2008-06-13 12:59:11 UTC
Works fine without the "&blredirect" on Tuesday and Wednesday
Comment 3 Max Semenik 2008-06-13 13:07:05 UTC
Unescaped SQL, and naked query displayed to end user in addition to all...
Comment 4 Bryan Tong Minh 2008-06-13 13:27:36 UTC
Fixed in r36257 and synched to Wikimedia. I should remember to backport this when I have time.
Comment 5 Bryan Tong Minh 2008-06-13 13:38:11 UTC
Also don't we have something like LinkBatch or similar to construct sql from a title array?

After some further investigation this slipped in in r31260 which did luckily not get in any previous release.

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


Navigation
Links