Page MenuHomePhabricator

Page Deletions broken in r36961
Closed, ResolvedPublic

Description

Author: overlordq

Description:
Error:

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/wiki/includes/db/DatabasePostgres.php on line 557

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/wiki/includes/db/DatabasePostgres.php on line 557
MediaWiki internal error.

Original exception: exception 'DBUnexpectedError' with message 'A database error has occurred
Query: UPDATE category SET cat_pages = cat_pages - 1 WHERE cat_title = 'Deities'
Function: Article::updateCategoryCounts
Error: 1 ERROR: current transaction is aborted, commands ignored until end of transaction block
' in /home/wiki/includes/db/DatabasePostgres.php:982
Stack trace:
#0 /home/wiki/includes/db/Database.php(562): DatabasePostgres->reportQueryError('ERROR: current...', 1, 'UPDATE categor...', 'Article::update...', false)
#1 /home/wiki/includes/db/Database.php(1318): Database->query('UPDATE categor...', 'Article::update...')
#2 /home/wiki/includes/Article.php(3495): Database->update('category', Array, Array, 'Article::update...')
#3 /home/wiki/includes/Article.php(2355): Article->updateCategoryCounts(Array, Array)
#4 /home/wiki/includes/Article.php(2257): Article->doDeleteArticle('content was: '=...', false)
#5 /home/wiki/includes/Article.php(2065): Article->doDelete('content was: '=...', false)
#6 /home/wiki/includes/Wiki.php(449): Article->delete()
#7 /home/wiki/includes/Wiki.php(59): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#8 /home/wiki/index.php(92): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
#9 {main}

Exception caught inside exception handler: exception 'DBUnexpectedError' with message 'SQL error: ERROR: current transaction is aborted, commands ignored until end of transaction block' in /home/wiki/includes/db/DatabasePostgres.php:586
Stack trace:
#0 /home/wiki/includes/db/Database.php(2621): DatabasePostgres->fetchObject(false)
#1 /home/wiki/includes/LinkBatch.php(98): ResultWrapper->fetchObject()
#2 /home/wiki/includes/LinkBatch.php(78): LinkBatch->addResultToCache(Object(LinkCache), Object(ResultWrapper))
#3 /home/wiki/includes/LinkBatch.php(68): LinkBatch->executeInto(Object(LinkCache))
#4 /home/wiki/includes/Skin.php(208): LinkBatch->execute()
#5 /home/wiki/includes/Skin.php(184): Skin->preloadExistence()
#6 /home/wiki/includes/SkinTemplate.php(106): Skin->initPage(Object(OutputPage))
#7 /home/wiki/skins/MonoBook.php(24): SkinTemplate->initPage(Object(OutputPage))
#8 /home/wiki/includes/SkinTemplate.php(151): SkinMonoBook->initPage(Object(OutputPage))
#9 /home/wiki/includes/OutputPage.php(821): SkinTemplate->outputPage(Object(OutputPage))
#10 /home/wiki/includes/Exception.php(150): OutputPage->output()
#11 /home/wiki/includes/Exception.php(174): MWException->reportHTML()
#12 /home/wiki/includes/Exception.php(260): MWException->report()
#13 /home/wiki/includes/Exception.php(294): wfReportException(Object(DBUnexpectedError))
#14 [internal function]: wfExceptionHandler(Object(DBUnexpectedError))

#15 {main}

Problem is this line in Article.php:

$dbw->insert( 'category', $insertRows, METHOD, 'IGNORE' );

I dont know if it's MySQL specific but I know INSERT IGNORE isn't supported in Postgres.

Related revisions: r32276 r32085 r32233


Version: 1.13.x
Severity: major

Details

Reference
bz14708

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
InvalidNone
ResolvedNone

Event Timeline

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

It's definitely MySQL specific. I fixed this up in r37062, please reopen this bug if the problem still exists.

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.