Last modified: 2012-08-04 20:49:04 UTC
The DatabasePostgres class is missing an insertSelect wrapper so it uses the method in Database.php which does not take into account the special handling for INSERT IGNORE. BT: === A database error has occurred Query: INSERT IGNORE INTO page_restrictions (pr_page,pr_type,pr_level,pr_cascade,pr_user,pr_expiry) SELECT 964,pr_type,pr_level,pr_cascade,pr_user,pr_expiry FROM page_restrictions WHERE pr_page = '5' Function: Title::moveTo Error: 1 ERROR: syntax error at or near "IGNORE" LINE 1: INSERT /* Title::moveTo EvilWiki */ IGNORE INTO page_restric... ^ Backtrace: #0 /var/www/domain/wiki/includes/db/Database.php(616): DatabasePostgres->reportQueryError('ERROR: syntax ...', 1, 'INSERT IGNORE I...', 'Title::moveTo', false) #1 /var/www/domain/wiki/includes/db/Database.php(1809): Database->query('INSERT IGNORE I...', 'Title::moveTo') #2 /var/www/domain/wiki/includes/Title.php(2724): Database->insertSelect('page_restrictio...', 'page_restrictio...', Array, Array, 'Title::moveTo', Array) #3 /var/www/domain/wiki/extensions/Renameuser/SpecialRenameuser_body.php(306): Title->moveTo(Object(Title), false, 'Automatically m...') #4 /var/www/domain/wiki/includes/SpecialPage.php(559): SpecialRenameuser->execute(NULL) #5 /var/www/domain/wiki/includes/Wiki.php(233): SpecialPage::executePath(Object(Title)) #6 /var/www/domain/wiki/includes/Wiki.php(62): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest)) #7 /var/www/domain/wiki/index.php(117): MediaWiki->initialize(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest)) #8 {main} ===
Thanks for the report, I'll look into this. If there is any special action needed on that special page to trigger the problem, please post it here.
Created attachment 6151 [details] bad patch Nothing special required, just whatever calls insertSelect with the IGNORE option which the only place I've found is in Title::moveTo when moving a protected page. He's my rough sketchup, lots of duplicated code from insert to handle the ignore, didn't really see a good way to shoehorn it into the existing insert function.
*** Bug 19088 has been marked as a duplicate of this bug. ***
Applied in r58179 likely could be better reworked as a calling DB::select and DB::insert separately instead of duplicating rollback code.