From: Aaron Schulz Date: Thu, 9 Apr 2015 22:49:15 +0000 (-0700) Subject: Reduce begin/commit activity in startAtomic with DBO_TRX X-Git-Tag: 1.31.0-rc.0~11757 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=commitdiff_plain;h=b6ef72190011c082c7d028d7997e1d5ae86b7428;p=lhc%2Fweb%2Fwiklou.git Reduce begin/commit activity in startAtomic with DBO_TRX Change-Id: I6c1334967aeff54fb18091c23749fcb0b49624b9 --- diff --git a/includes/db/Database.php b/includes/db/Database.php index 0c0248da34..511edf8aff 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -3525,7 +3525,11 @@ abstract class DatabaseBase implements IDatabase { if ( !$this->mTrxLevel ) { $this->begin( $fname ); $this->mTrxAutomatic = true; - $this->mTrxAutomaticAtomic = true; + // If DBO_TRX is set, a series of startAtomic/endAtomic pairs will result + // in all changes being in one transaction to keep requests transactional. + if ( !$this->getFlag( DBO_TRX ) ) { + $this->mTrxAutomaticAtomic = true; + } } $this->mTrxAtomicLevels->push( $fname );