From: jenkins-bot Date: Thu, 22 Mar 2018 01:07:06 +0000 (+0000) Subject: Merge "rdbms: clean up DBO_TRX behavior for onTransactionPreCommitOrIdle()" X-Git-Tag: 1.31.0-rc.0~316 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=6c1cd929cb1c1fe0bcbde9fea59a1ff9bc2d9c6f;p=lhc%2Fweb%2Fwiklou.git Merge "rdbms: clean up DBO_TRX behavior for onTransactionPreCommitOrIdle()" --- 6c1cd929cb1c1fe0bcbde9fea59a1ff9bc2d9c6f diff --cc includes/libs/rdbms/database/Database.php index 00bc1cbc49,003bca064a..417f64c8a5 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@@ -3395,19 -3294,13 +3395,13 @@@ abstract class Database implements IDat } final public function rollback( $fname = __METHOD__, $flush = '' ) { - if ( $flush === self::FLUSHING_INTERNAL || $flush === self::FLUSHING_ALL_PEERS ) { - if ( !$this->trxLevel ) { - return; // nothing to do - } - } else { - if ( !$this->trxLevel ) { - $this->queryLogger->error( - "$fname: No transaction to rollback, something got out of sync." ); - return; // nothing to do - } elseif ( $this->getFlag( self::DBO_TRX ) ) { + $trxActive = $this->trxLevel; + + if ( $flush !== self::FLUSHING_INTERNAL && $flush !== self::FLUSHING_ALL_PEERS ) { + if ( $this->getFlag( self::DBO_TRX ) ) { throw new DBUnexpectedError( $this, - "$fname: Expected mass rollback of all peer databases (DBO_TRX set)." + "$fname: Expected mass rollback of all peer transactions (DBO_TRX set)." ); } }