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:
a70c4a4
)
database: make close() sanity check mTrxPreCommitCallbacks
author
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 17 Aug 2017 04:25:29 +0000
(21:25 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 17 Aug 2017 04:25:29 +0000
(21:25 -0700)
The other callback types are already checked too.
Change-Id: Ibdc82110c0a0e74bb07ed92ee667bdf0d9f69f90
includes/libs/rdbms/database/Database.php
patch
|
blob
|
history
diff --git
a/includes/libs/rdbms/database/Database.php
b/includes/libs/rdbms/database/Database.php
index
7349b63
..
cec13b5
100644
(file)
--- a/
includes/libs/rdbms/database/Database.php
+++ b/
includes/libs/rdbms/database/Database.php
@@
-758,7
+758,11
@@
abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
$closed = $this->closeConnection();
$this->mConn = false;
- } elseif ( $this->mTrxIdleCallbacks || $this->mTrxEndCallbacks ) { // sanity
+ } elseif (
+ $this->mTrxIdleCallbacks ||
+ $this->mTrxPreCommitCallbacks ||
+ $this->mTrxEndCallbacks
+ ) { // sanity
throw new RuntimeException( "Transaction callbacks still pending." );
} else {
$closed = true;