Last modified: 2006-07-24 22:21:53 UTC
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.
Created attachment 2124 [details] make errno conditional based on an actual error.