https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112388

Revision: 112388
Author:   ialex
Date:     2012-02-25 13:23:43 +0000 (Sat, 25 Feb 2012)
Log Message:
-----------
Pass __METHOD__ to DatabaseBase::begin(), DatabaseBase::commit() and 
DatabaseBase::rollback()

Modified Paths:
--------------
    trunk/phase3/includes/db/DatabaseIbm_db2.php
    trunk/phase3/includes/db/DatabaseMysql.php
    trunk/phase3/includes/db/DatabaseOracle.php
    trunk/phase3/includes/db/DatabasePostgres.php
    trunk/phase3/includes/db/DatabaseSqlite.php
    trunk/phase3/includes/db/LoadBalancer.php

Modified: trunk/phase3/includes/db/DatabaseIbm_db2.php
===================================================================
--- trunk/phase3/includes/db/DatabaseIbm_db2.php        2012-02-25 13:21:26 UTC 
(rev 112387)
+++ trunk/phase3/includes/db/DatabaseIbm_db2.php        2012-02-25 13:23:43 UTC 
(rev 112388)
@@ -561,7 +561,7 @@
                $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 @@
        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 @@
                        $this->mAffectedRows = $numrowsinserted;
                }
                // commit either way
-               $this->commit();
+               $this->commit( __METHOD__ );
                $this->freePrepared( $stmt );
 
                return $res;

Modified: trunk/phase3/includes/db/DatabaseMysql.php
===================================================================
--- trunk/phase3/includes/db/DatabaseMysql.php  2012-02-25 13:21:26 UTC (rev 
112387)
+++ trunk/phase3/includes/db/DatabaseMysql.php  2012-02-25 13:23:43 UTC (rev 
112388)
@@ -158,7 +158,7 @@
                $this->mOpened = false;
                if ( $this->mConn ) {
                        if ( $this->trxLevel() ) {
-                               $this->commit();
+                               $this->commit( __METHOD__ );
                        }
                        return mysql_close( $this->mConn );
                } else {
@@ -558,7 +558,7 @@
 
                # Commit any open transactions
                if ( $this->mTrxLevel ) {
-                       $this->commit();
+                       $this->commit( __METHOD__ );
                }
 
                if ( !is_null( $this->mFakeSlaveLag ) ) {

Modified: trunk/phase3/includes/db/DatabaseOracle.php
===================================================================
--- trunk/phase3/includes/db/DatabaseOracle.php 2012-02-25 13:21:26 UTC (rev 
112387)
+++ trunk/phase3/includes/db/DatabaseOracle.php 2012-02-25 13:23:43 UTC (rev 
112388)
@@ -292,7 +292,7 @@
                $this->mOpened = false;
                if ( $this->mConn ) {
                        if ( $this->mTrxLevel ) {
-                               $this->commit();
+                               $this->commit( __METHOD__ );
                        }
                        return oci_close( $this->mConn );
                } else {

Modified: trunk/phase3/includes/db/DatabasePostgres.php
===================================================================
--- trunk/phase3/includes/db/DatabasePostgres.php       2012-02-25 13:21:26 UTC 
(rev 112387)
+++ trunk/phase3/includes/db/DatabasePostgres.php       2012-02-25 13:23:43 UTC 
(rev 112388)
@@ -466,7 +466,7 @@
                $didbegin = 0;
                if ( $ignore ) {
                        if ( !$this->mTrxLevel ) {
-                               $this->begin();
+                               $this->begin( __METHOD__ );
                                $didbegin = 1;
                        }
                        $olde = error_reporting( 0 );

Modified: trunk/phase3/includes/db/DatabaseSqlite.php
===================================================================
--- trunk/phase3/includes/db/DatabaseSqlite.php 2012-02-25 13:21:26 UTC (rev 
112387)
+++ trunk/phase3/includes/db/DatabaseSqlite.php 2012-02-25 13:23:43 UTC (rev 
112388)
@@ -122,7 +122,7 @@
        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 @@
 
        function begin( $fname = '' ) {
                if ( $this->mTrxLevel == 1 ) {
-                       $this->commit();
+                       $this->commit( __METHOD__ );
                }
                $this->mConn->beginTransaction();
                $this->mTrxLevel = 1;

Modified: trunk/phase3/includes/db/LoadBalancer.php
===================================================================
--- trunk/phase3/includes/db/LoadBalancer.php   2012-02-25 13:21:26 UTC (rev 
112387)
+++ trunk/phase3/includes/db/LoadBalancer.php   2012-02-25 13:23:43 UTC (rev 
112388)
@@ -894,7 +894,7 @@
                foreach ( $this->mConns as $conns2 ) {
                        foreach ( $conns2 as $conns3 ) {
                                foreach ( $conns3 as $conn ) {
-                                       $conn->commit();
+                                       $conn->commit( __METHOD__ );
                                }
                        }
                }


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

Reply via email to