r112388 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112387‎ | r112388 | r112389 >
Date:13:23, 25 February 2012
Author:ialex
Status:ok
Tags:
Comment:
Pass __METHOD__ to DatabaseBase::begin(), DatabaseBase::commit() and DatabaseBase::rollback()
Modified paths:
  • /trunk/phase3/includes/db/DatabaseIbm_db2.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseMysql.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)
  • /trunk/phase3/includes/db/LoadBalancer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseMysql.php
@@ -158,7 +158,7 @@
159159 $this->mOpened = false;
160160 if ( $this->mConn ) {
161161 if ( $this->trxLevel() ) {
162 - $this->commit();
 162+ $this->commit( __METHOD__ );
163163 }
164164 return mysql_close( $this->mConn );
165165 } else {
@@ -558,7 +558,7 @@
559559
560560 # Commit any open transactions
561561 if ( $this->mTrxLevel ) {
562 - $this->commit();
 562+ $this->commit( __METHOD__ );
563563 }
564564
565565 if ( !is_null( $this->mFakeSlaveLag ) ) {
Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -292,7 +292,7 @@
293293 $this->mOpened = false;
294294 if ( $this->mConn ) {
295295 if ( $this->mTrxLevel ) {
296 - $this->commit();
 296+ $this->commit( __METHOD__ );
297297 }
298298 return oci_close( $this->mConn );
299299 } else {
Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -466,7 +466,7 @@
467467 $didbegin = 0;
468468 if ( $ignore ) {
469469 if ( !$this->mTrxLevel ) {
470 - $this->begin();
 470+ $this->begin( __METHOD__ );
471471 $didbegin = 1;
472472 }
473473 $olde = error_reporting( 0 );
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php
@@ -561,7 +561,7 @@
562562 $this->mOpened = false;
563563 if ( $this->mConn ) {
564564 if ( $this->trxLevel() > 0 ) {
565 - $this->commit();
 565+ $this->commit( __METHOD__ );
566566 }
567567 return db2_close( $this->mConn );
568568 } else {
@@ -577,12 +577,12 @@
578578 public function lastError() {
579579 $connerr = db2_conn_errormsg();
580580 if ( $connerr ) {
581 - //$this->rollback();
 581+ //$this->rollback( __METHOD__ );
582582 return $connerr;
583583 }
584584 $stmterr = db2_stmt_errormsg();
585585 if ( $stmterr ) {
586 - //$this->rollback();
 586+ //$this->rollback( __METHOD__ );
587587 return $stmterr;
588588 }
589589
@@ -1084,7 +1084,7 @@
10851085 $this->mAffectedRows = $numrowsinserted;
10861086 }
10871087 // commit either way
1088 - $this->commit();
 1088+ $this->commit( __METHOD__ );
10891089 $this->freePrepared( $stmt );
10901090
10911091 return $res;
Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -122,7 +122,7 @@
123123 function close() {
124124 $this->mOpened = false;
125125 if ( is_object( $this->mConn ) ) {
126 - if ( $this->trxLevel() ) $this->commit();
 126+ if ( $this->trxLevel() ) $this->commit( __METHOD__ );
127127 $this->mConn = null;
128128 }
129129 return true;
@@ -636,7 +636,7 @@
637637
638638 function begin( $fname = '' ) {
639639 if ( $this->mTrxLevel == 1 ) {
640 - $this->commit();
 640+ $this->commit( __METHOD__ );
641641 }
642642 $this->mConn->beginTransaction();
643643 $this->mTrxLevel = 1;
Index: trunk/phase3/includes/db/LoadBalancer.php
@@ -894,7 +894,7 @@
895895 foreach ( $this->mConns as $conns2 ) {
896896 foreach ( $conns2 as $conns3 ) {
897897 foreach ( $conns3 as $conn ) {
898 - $conn->commit();
 898+ $conn->commit( __METHOD__ );
899899 }
900900 }
901901 }

Status & tagging log