Last modified: 2010-05-15 16:03:38 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 13454 - new Category changes break refreshlinks maintnence script
new Category changes break refreshlinks maintnence script
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  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: ---


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

#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/ LinksUpdate->doUpdate()
#6 /home/wiki/maintenance/ 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:

SELECT /* Revision::fetchRow */  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 */  old_text,old_flags  FROM pagecontent  WHERE old_id = '102'  LIMIT 1  
SELECT version()
INSERT /* Article::updateCategoryCounts */ INTO category () VALUES ()
SELECT /* LinksUpdate::getExistingProperties */  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.