From 1d5b18a1a2c3d01f3232e14ff14bed24ab42943d Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 12 Apr 2011 20:27:26 +0000 Subject: [PATCH] Revert r85776, r85782 pending better solution --- RELEASE-NOTES | 4 +--- includes/Block.php | 9 +-------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 536e99819f..9034363590 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -236,11 +236,9 @@ PHP if you have not done so prior to upgrading MediaWiki. * (bug 28372) Fix bogus link to suppressed file versions in ForeignDBRepo * (bug 27473) Fix regression: bold, italic no longer interfere with linktrail for ca, kaa * (bug 28444) Fix regression: edit-on-doubleclick retains revision id again -* (bug 28485) Block::purgeExpired Database returned error "1205: Lock wait timeout - exceeded;" * (bug 27639) Transaction timeout when trying to OldLocalFile::upgradeRow() - === API changes in 1.18 === +=== API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result * (bug 14869) Add API module for accessing QueryPage-based special pages * (bug 14020) API for Special:Unwatchedpages diff --git a/includes/Block.php b/includes/Block.php index bc4c552b8b..f1b3e7f821 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -889,15 +889,8 @@ class Block { * Purge expired blocks from the ipblocks table */ public static function purgeExpired() { - // https://bugzilla.wikimedia.org/show_bug.cgi?id=28485 - // 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->delete( 'ipblocks', array( 'ipb_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ), __METHOD__ ); - - $lb->commitMasterChanges(); - $lb->closeAll(); } /** -- 2.20.1