Issue discovered handling T143580:
$ mwscript namespaceDupes.php azwiktionary --fix --merge id=7935 ns=0 dbk=Vikilüğət:Kənd_meydanı => Vikilüğət:Kənd_meydanı (merge) [322d0f64aea67bd63616c5d9] [no req] DBUnexpectedError from line 2753 of /srv/mediawiki/php-1.28.0-wmf.15/includes/db/Database.php: DatabaseBase::{closure}: Flushing an explicit transaction, getting out of sync! Backtrace: #0 /srv/mediawiki/php-1.28.0-wmf.15/includes/db/Database.php(3305): DatabaseBase->commit(string, string) #1 [internal function]: DatabaseBase->{closure}() #2 /srv/mediawiki/php-1.28.0-wmf.15/includes/libs/ScopedCallback.php(74): call_user_func_array(Closure, array) #3 [internal function]: ScopedCallback->__destruct() #4 [internal function]: DatabaseBase->getScopedLockAndFlush(string, string, integer) #5 /srv/mediawiki/php-1.28.0-wmf.15/includes/db/DBConnRef.php(39): call_user_func_array(array, array) #6 /srv/mediawiki/php-1.28.0-wmf.15/includes/db/DBConnRef.php(517): DBConnRef->__call(string, array) #7 /srv/mediawiki/php-1.28.0-wmf.15/includes/deferred/LinksUpdate.php(178): DBConnRef->getScopedLockAndFlush(string, string, integer) #8 /srv/mediawiki/php-1.28.0-wmf.15/includes/deferred/LinksDeletionUpdate.php(62): LinksUpdate::acquirePageLock(DBConnRef, integer) #9 /srv/mediawiki/php-1.28.0-wmf.15/maintenance/namespaceDupes.php(609): LinksDeletionUpdate->doUpdate() #10 /srv/mediawiki/php-1.28.0-wmf.15/maintenance/namespaceDupes.php(316): NamespaceConflictChecker->mergePage(stdClass, Title) #11 /srv/mediawiki/php-1.28.0-wmf.15/maintenance/namespaceDupes.php(176): NamespaceConflictChecker->checkNamespace(integer, string, array) #12 /srv/mediawiki/php-1.28.0-wmf.15/maintenance/namespaceDupes.php(86): NamespaceConflictChecker->checkAll(array) #13 /srv/mediawiki/php-1.28.0-wmf.15/maintenance/doMaintenance.php(106): NamespaceConflictChecker->execute() #14 /srv/mediawiki/php-1.28.0-wmf.15/maintenance/namespaceDupes.php(617): require_once(string) #15 /srv/mediawiki/multiversion/MWScript.php(97): require_once(string) #16 {main}
Could be a consequence of 63a3911a.