dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a3d869
)
Reduce begin/commit activity in startAtomic with DBO_TRX
author
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 9 Apr 2015 22:49:15 +0000
(15:49 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 9 Apr 2015 22:49:15 +0000
(15:49 -0700)
Change-Id: I6c1334967aeff54fb18091c23749fcb0b49624b9
includes/db/Database.php
patch
|
blob
|
history
diff --git
a/includes/db/Database.php
b/includes/db/Database.php
index
0c0248d
..
511edf8
100644
(file)
--- 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 );