Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/133853

Change subject: Minor fix to DatabaseBase::close() logic
......................................................................

Minor fix to DatabaseBase::close() logic

* Only set mOpened to false if closeConnection() was called (or mConn was unset)

bug: 65100
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/53/133853/1

diff --git a/includes/db/Database.php b/includes/db/Database.php
index f7fe980..e569fa2 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/133853
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: wmf/1.24wmf5
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to