From: Aaron Schulz Date: Mon, 9 Nov 2015 06:02:30 +0000 (-0800) Subject: Removed useless field in SqlBagOStuff X-Git-Tag: 1.31.0-rc.0~9041^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=5b77995417861c37d6a4dc8f9f740bd2add7f897;p=lhc%2Fweb%2Fwiklou.git Removed useless field in SqlBagOStuff Change-Id: I27c0b35769667ce48ba761ff4bbc828033c6849d --- diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index a6f2d377c3..57765190e9 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -27,8 +27,6 @@ * @ingroup Cache */ class SqlBagOStuff extends BagOStuff { - /** @var LoadBalancer */ - protected $lb; /** @var array */ protected $serverInfos; /** @var array */ @@ -150,15 +148,13 @@ class SqlBagOStuff extends BagOStuff { $db = DatabaseBase::factory( $type, $info ); $db->clearFlag( DBO_TRX ); } else { - /* - * We must keep a separate connection to MySQL in order to avoid deadlocks - * However, SQLite has an opposite behavior. And PostgreSQL needs to know - * if we are in transaction or no - */ + // We must keep a separate connection to MySQL in order to avoid deadlocks + // However, SQLite has an opposite behavior. And PostgreSQL needs to know + // if we are in transaction or not (@TODO: find some work-around). $index = $this->slaveOnly ? DB_SLAVE : DB_MASTER; if ( wfGetDB( $index )->getType() == 'mysql' ) { - $this->lb = wfGetLBFactory()->newMainLB(); - $db = $this->lb->getConnection( $index ); + $lb = wfGetLBFactory()->newMainLB(); + $db = $lb->getConnection( $index ); $db->clearFlag( DBO_TRX ); // auto-commit mode } else { $db = wfGetDB( $index );