Last modified: 2010-05-15 16:03:38 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 T15454, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13454 - new Category changes break refreshlinks maintnence script
new Category changes break refreshlinks maintnence script
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.13.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-20 17:29 UTC by OverlordQ
Modified: 2010-05-15 16:03 UTC (History)
1 user (show)

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


Attachments

Description OverlordQ 2008-03-20 17:29:32 UTC
I really dont know if this is PostgreSQL specific or not so I'll leave that keyword off, but I think it's due to the new article/category stuffs going into svn.

Being bored I was going through all the maintenance scripts to see if they were working with Postgres and when I got to the refreshLinks script I got a weird error:

====
Warning: pg_query(): Query failed: ERROR:  current transaction is aborted, commands ignored until end of transaction block in /home/wiki/includes/DatabasePostgres.php on line 554
A database error has occurred
Query: SELECT  pp_propname,pp_value  FROM page_props  WHERE pp_page = '1'   FOR UPDATE
Function: LinksUpdate::getExistingProperties
Error: 1 ERROR:  current transaction is aborted, commands ignored until end of transaction block

Backtrace:
#0 /home/wiki/includes/Database.php(799): DatabasePostgres->reportQueryError('ERROR:  current...', 1, 'SELECT  pp_prop...', 'LinksUpdate::ge...', false)
#1 /home/wiki/includes/Database.php(1244): Database->query('SELECT  pp_prop...', 'LinksUpdate::ge...')
#2 /home/wiki/includes/LinksUpdate.php(660): Database->select('page_props', Array, Array, 'LinksUpdate::ge...', Array)
#3 /home/wiki/includes/LinksUpdate.php(134): LinksUpdate->getExistingProperties()
#4 /home/wiki/includes/LinksUpdate.php(83): LinksUpdate->doIncrementalUpdate()
#5 /home/wiki/maintenance/refreshLinks.inc(136): LinksUpdate->doUpdate()
#6 /home/wiki/maintenance/refreshLinks.inc(90): fixLinksFromArticle(1)
#7 /home/wiki/maintenance/refreshLinks.php(42): refreshLinks(1, NULL, NULL, NULL, NULL, NULL)
#8 {main}
====

Running that query by itself yields no errors, but it mentions transactions, so throwing in a echo on 552 on includes/DatabasePostgres.php to get at the actual SQL queries being run I ran into this:

====
BEGIN
SELECT /* Revision::fetchRow 127.0.0.1 */  page_namespace,page_title,page_latest,rev_id,rev_page,rev_text_id,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_timestamp,rev_deleted,rev_len  FROM page,revision  WHERE (rev_id=page_latest) AND (page_id=rev_page) AND page_namespace = '0' AND page_title = 'Main_Page'  LIMIT 1  
SELECT /* Revision::loadText 127.0.0.1 */  old_text,old_flags  FROM pagecontent  WHERE old_id = '102'  LIMIT 1  
...
SELECT version()
INSERT /* Article::updateCategoryCounts 127.0.0.1 */ INTO category () VALUES ()
SELECT /* LinksUpdate::getExistingProperties 127.0.0.1 */  pp_propname,pp_value  FROM page_props  WHERE pp_page = '1'   FOR UPDATE
====

Empty inserts do not make a DB happy.

Not sure what circumstances cause this, so it might be able to be triggered from elsewhere besides running the maintenance scripts.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-03-20 17:33:46 UTC
Thanks for the report, this should be fixed in r32233.

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


Navigation
Links