From b6ef72190011c082c7d028d7997e1d5ae86b7428 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 9 Apr 2015 15:49:15 -0700 Subject: [PATCH] Reduce begin/commit activity in startAtomic with DBO_TRX Change-Id: I6c1334967aeff54fb18091c23749fcb0b49624b9 --- includes/db/Database.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ); -- 2.20.1