Pass __METHOD__ to DatabaseBase::begin(), DatabaseBase::commit() and DatabaseBase...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 25 Feb 2012 13:23:43 +0000 (13:23 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 25 Feb 2012 13:23:43 +0000 (13:23 +0000)
includes/db/DatabaseIbm_db2.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php
includes/db/LoadBalancer.php

index 790a177..4d9e707 100644 (file)
@@ -561,7 +561,7 @@ class DatabaseIbm_db2 extends DatabaseBase {
                $this->mOpened = false;
                if ( $this->mConn ) {
                        if ( $this->trxLevel() > 0 ) {
-                               $this->commit();
+                               $this->commit( __METHOD__ );
                        }
                        return db2_close( $this->mConn );
                } else {
@@ -577,12 +577,12 @@ class DatabaseIbm_db2 extends DatabaseBase {
        public function lastError() {
                $connerr = db2_conn_errormsg();
                if ( $connerr ) {
-                       //$this->rollback();
+                       //$this->rollback( __METHOD__ );
                        return $connerr;
                }
                $stmterr = db2_stmt_errormsg();
                if ( $stmterr ) {
-                       //$this->rollback();
+                       //$this->rollback( __METHOD__ );
                        return $stmterr;
                }
 
@@ -1084,7 +1084,7 @@ class DatabaseIbm_db2 extends DatabaseBase {
                        $this->mAffectedRows = $numrowsinserted;
                }
                // commit either way
-               $this->commit();
+               $this->commit( __METHOD__ );
                $this->freePrepared( $stmt );
 
                return $res;
index b4efd56..23d6531 100644 (file)
@@ -158,7 +158,7 @@ class DatabaseMysql extends DatabaseBase {
                $this->mOpened = false;
                if ( $this->mConn ) {
                        if ( $this->trxLevel() ) {
-                               $this->commit();
+                               $this->commit( __METHOD__ );
                        }
                        return mysql_close( $this->mConn );
                } else {
@@ -558,7 +558,7 @@ class DatabaseMysql extends DatabaseBase {
 
                # Commit any open transactions
                if ( $this->mTrxLevel ) {
-                       $this->commit();
+                       $this->commit( __METHOD__ );
                }
 
                if ( !is_null( $this->mFakeSlaveLag ) ) {
index 8a35ad5..32a38ad 100644 (file)
@@ -292,7 +292,7 @@ class DatabaseOracle extends DatabaseBase {
                $this->mOpened = false;
                if ( $this->mConn ) {
                        if ( $this->mTrxLevel ) {
-                               $this->commit();
+                               $this->commit( __METHOD__ );
                        }
                        return oci_close( $this->mConn );
                } else {
index 6a453e7..978bfc7 100644 (file)
@@ -466,7 +466,7 @@ class DatabasePostgres extends DatabaseBase {
                $didbegin = 0;
                if ( $ignore ) {
                        if ( !$this->mTrxLevel ) {
-                               $this->begin();
+                               $this->begin( __METHOD__ );
                                $didbegin = 1;
                        }
                        $olde = error_reporting( 0 );
index 0556810..1cc82cf 100644 (file)
@@ -122,7 +122,7 @@ class DatabaseSqlite extends DatabaseBase {
        function close() {
                $this->mOpened = false;
                if ( is_object( $this->mConn ) ) {
-                       if ( $this->trxLevel() ) $this->commit();
+                       if ( $this->trxLevel() ) $this->commit( __METHOD__ );
                        $this->mConn = null;
                }
                return true;
@@ -636,7 +636,7 @@ class DatabaseSqlite extends DatabaseBase {
 
        function begin( $fname = '' ) {
                if ( $this->mTrxLevel == 1 ) {
-                       $this->commit();
+                       $this->commit( __METHOD__ );
                }
                $this->mConn->beginTransaction();
                $this->mTrxLevel = 1;
index 1d00f8f..db348e8 100644 (file)
@@ -894,7 +894,7 @@ class LoadBalancer {
                foreach ( $this->mConns as $conns2 ) {
                        foreach ( $conns2 as $conns3 ) {
                                foreach ( $conns3 as $conn ) {
-                                       $conn->commit();
+                                       $conn->commit( __METHOD__ );
                                }
                        }
                }