Last modified: 2010-05-15 16:03:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14526 - API Exception - internal_api_error_DBQueryError
API Exception - internal_api_error_DBQueryError
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
All All
: Highest critical (vote)
: ---
Assigned To: Bryan Tong Minh
Depends on:
  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: ---


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

<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_ (

#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}


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
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.