Last modified: 2007-07-18 21:48:36 UTC
Querying the API for logevents fails with the following error: <?xml version="1.0" encoding="utf-8"?> <api> <error code="internal_api_error" info="Exception Caught: A database error has occurred Query: SELECT /*! STRAIGHT_JOIN */ log_type,log_action,log_timestamp,log_id,page_id,log_user,user_name,log_namespace,log_title,log_comment,log_params FROM `logging` LEFT OUTER JOIN `page` ON log_namespace=page_namespace AND log_title=page_title INNER JOIN `user` ON user_id=log_user ORDER BY log_timestamp DESC LIMIT 11 Function: ApiQueryLogEvents::execute Error: 1054 Unknown column 'log_id' in 'field list' (10.0.0.237) "> #0 /usr/local/apache/common-local/php-1.5/includes/Database.php(765): Database->reportQueryError('Unknown column ...', 1054, ' SELECT /*! ST...', 'ApiQueryLogEven...', false) #1 /usr/local/apache/common-local/php-1.5/includes/Database.php(1210): Database->query(' SELECT /*! ST...', 'ApiQueryLogEven...') #2 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryBase.php(125): Database->select(Array, Array, Array, 'ApiQueryLogEven...', Array) #3 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryLogEvents.php(109): ApiQueryBase->select('ApiQueryLogEven...') #4 /usr/local/apache/common-local/php-1.5/includes/api/ApiQuery.php(195): ApiQueryLogEvents->execute() #5 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(304): ApiQuery->execute() #6 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(190): ApiMain->executeAction() #7 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(175): 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> </api>
Fixed (well, worked around) in r24256. The API was SELECTing the `log_id` column from `logging`, which isn't live on Wikimedia at the moment.