Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/133760
Change subject: Tweaks to Database close() logic
......................................................................
Tweaks to Database close() logic
* Only set mOpened to false if closeConnection() was called (or mConn was unset)
Change-Id: I1ba6b765cfc647a47f21048d993047c0fe0cfe19
---
M includes/db/Database.php
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/60/133760/1
diff --git a/includes/db/Database.php b/includes/db/Database.php
index 286f8b0..13efb81 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -926,7 +926,6 @@
if ( count( $this->mTrxIdleCallbacks ) ) { // sanity
throw new MWException( "Transaction idle callbacks
still pending." );
}
- $this->mOpened = false;
if ( $this->mConn ) {
if ( $this->trxLevel() ) {
if ( !$this->mTrxAutomatic ) {
@@ -937,13 +936,14 @@
$this->commit( __METHOD__, 'flush' );
}
- $ret = $this->closeConnection();
+ $closed = $this->closeConnection();
$this->mConn = false;
-
- return $ret;
} else {
- return true;
+ $closed = true;
}
+ $this->mOpened = false;
+
+ return $closed;
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/133760
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ba6b765cfc647a47f21048d993047c0fe0cfe19
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits