Page MenuHomePhabricator

database error with inprop=protection for missing page
Closed, ResolvedPublic

Description

Author: srbauer

Description:
The query prop=info&inprop=protection for a missing page causes a database error:

<error code="internal_api_error" info="Exception Caught: A database error has occurred
Query: SELECT pr_page,pr_type,pr_level,pr_expiry FROM page_restrictions WHERE pr_page IN ()
Function: ApiQueryInfo::execute
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 ')' at line 1 (10.0.0.24)
">

#0 /usr/local/apache/common-local/php-1.5/includes/Database.php(761): Database->reportQueryError('You have an err...', 1064, 'SELECT pr_page...', 'ApiQueryInfo::e...', false)
#1 /usr/local/apache/common-local/php-1.5/includes/Database.php(1179): Database->query('SELECT pr_page...', 'ApiQueryInfo::e...')
#2 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryBase.php(125): Database->select(Array, Array, Array, 'ApiQueryInfo::e...', Array)
#3 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryInfo.php(77): ApiQueryBase->select('ApiQueryInfo::e...')
#4 /usr/local/apache/common-local/php-1.5/includes/api/ApiQuery.php(197): ApiQueryInfo->execute()
#5 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(270): ApiQuery->execute()
#6 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(169): ApiMain->executeAction()
#7 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(154): ApiMain->executeActionWithErrorHandling()
#8 /usr/local/apache/common-local/php-1.5/api.php(54): ApiMain->execute()
#9 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#10 {main}

</error>


Version: unspecified
Severity: normal
URL: http://de.wikipedia.org/w/api.php?action=query&prop=info&inprop=protection&titles=Vorlage:Stub

Details

Reference
bz10439

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:49 PM
bzimport set Reference to bz10439.
bzimport added a subscriber: Unknown Object (MLST).

srbauer wrote:

Does revision 23636 fix this error?

(In reply to comment #1)

Does revision 23636 fix this error?

Yes, fixed in r23636. I discovered the same behavior you did (by requesting an undelete token for a page that obviously didn't exist anymore), and I fixed it.