Page MenuHomePhabricator

Import Does Not Work With PostgreSQL
Closed, ResolvedPublic

Description

Author: xzilla

Description:
The import feature (Special::Import) breaks on PostgreSQL with the following error:

A database error has occurred Query: SELECT page_namespace,page_title FROM
templatelinks,page WHERE (page_id=tl_from) AND tl_namespace = '0' AND tl_title =
'Async_Unlisten' Function: Object id #96 Error: 1

Backtrace:

#0 /home/rob/devel/mediawiki/phase3/includes/DatabasePostgres.php(551):
DatabasePostgres::reportQueryError()
#1 /home/rob/devel/mediawiki/phase3/includes/Database.php(1644):
DatabasePostgres->reportQueryError('', 1, 'SELECT page_na...', Object(WikiRevision))
#2 /home/rob/devel/mediawiki/phase3/includes/SpecialImport.php(502):
DatabasePostgres->deadlockLoop(Array)
#3 /home/rob/devel/mediawiki/phase3/includes/SpecialImport.php(732):
WikiImporter->importRevision(Object(WikiRevision), Object(WikiImporter))
#4 /home/rob/devel/mediawiki/phase3/includes/SpecialImport.php(732):
call_user_func_array(Array, Array)
#5 /home/rob/devel/mediawiki/phase3/includes/SpecialImport.php(418):
WikiImporter->out_revision(Resource id #97, 'revision')
#6 /home/rob/devel/mediawiki/phase3/includes/SpecialImport.php(418):
xml_parse(Resource id #97, '<mediawiki xmln...', 1)
#7 /home/rob/devel/mediawiki/phase3/includes/SpecialImport.php(76):
WikiImporter->doImport()
#8 /home/rob/devel/mediawiki/phase3/includes/SpecialPage.php(499):
wfSpecialImport(NULL, Object(SpecialPage))
#9 /home/rob/devel/mediawiki/phase3/includes/SpecialPage.php(368):
SpecialPage->execute(NULL)
#10 /home/rob/devel/mediawiki/phase3/includes/Wiki.php(156):
SpecialPage::executePath(Object(Title))
#11 /home/rob/devel/mediawiki/phase3/includes/Wiki.php(47):
MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage),
Object(WebRequest))
#12 /home/rob/devel/mediawiki/phase3/index.php(47):
MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User),
Object(WebRequest))
#13 {main}

The problem is that the implementation of lastErrno is hardcoded to always
return 1, which is interpreted as an error even if no error has occured.


Version: 1.8.x
Severity: major
OS: Linux
Platform: PC

Details

Reference
bz6732

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, 9:17 PM
bzimport set Reference to bz6732.
bzimport added a subscriber: Unknown Object (MLST).

xzilla wrote:

make errno conditional based on an actual error.

Attached:

Jdforrester-WMF subscribed.

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