From: Sam Reed Date: Mon, 11 Apr 2011 18:29:18 +0000 (+0000) Subject: Revert r85783, it seems to brake random stuff in random places #fail X-Git-Tag: 1.31.0-rc.0~30929 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=488f7a375cacb227a3709f7eb0d046a5df907639;p=lhc%2Fweb%2Fwiklou.git Revert r85783, it seems to brake random stuff in random places #fail --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c05142b803..8d8784731b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -237,7 +237,6 @@ PHP if you have not done so prior to upgrading MediaWiki. * (bug 28444) Fix regression: edit-on-doubleclick retains revision id again * (bug 28485) Block::purgeExpired Database returned error "1205: Lock wait timeout exceeded;" -* (bug 20468) User::invalidateCache throws 1205: Lock wait timeout exceeded * (bug 27639) Transaction timeout when trying to OldLocalFile::upgradeRow() * (bug 13921) deadlocks mass-deleting media files in categories diff --git a/includes/User.php b/includes/User.php index c9ce405b1a..3ffd4a9276 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1729,18 +1729,12 @@ class User { if( $this->mId ) { $this->mTouched = self::newTouchedTimestamp(); - // https://bugzilla.wikimedia.org/show_bug.cgi?id=20468 - // Create and use a new loadBalancer object, to prevent "1205: Lock wait timeout exceeded;" - $lb = wfGetLBFactory()->newMainLB(); - $dbw = $lb->getConnection( DB_MASTER ); - + $dbw = wfGetDB( DB_MASTER ); $dbw->update( 'user', array( 'user_touched' => $dbw->timestamp( $this->mTouched ) ), array( 'user_id' => $this->mId ), __METHOD__ ); - $lb->commitMasterChanges(); - $lb->closeAll(); $this->clearSharedCache(); } }