From b2de75c890608d848d15f651d0edbccf3ee53121 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 12 Apr 2011 20:30:25 +0000 Subject: [PATCH] Reverting r85784 for good measure too (Pending better solution) --- RELEASE-NOTES | 1 - includes/filerepo/OldLocalFile.php | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9034363590..942e192d7f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -236,7 +236,6 @@ 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 27639) Transaction timeout when trying to OldLocalFile::upgradeRow() === API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result diff --git a/includes/filerepo/OldLocalFile.php b/includes/filerepo/OldLocalFile.php index 6d025feac9..7e733cc690 100644 --- a/includes/filerepo/OldLocalFile.php +++ b/includes/filerepo/OldLocalFile.php @@ -160,13 +160,9 @@ class OldLocalFile extends LocalFile { return; } + $dbw = $this->repo->getMasterDB(); list( $major, $minor ) = self::splitMime( $this->mime ); - // https://bugzilla.wikimedia.org/show_bug.cgi?id=27639 - // Create and use a new loadBalancer object, to prevent "1205: Lock wait timeout exceeded;" - $lb = wfGetLBFactory()->newMainLB(); - $dbw = $lb->getConnection( DB_MASTER ); - wfDebug(__METHOD__.': upgrading '.$this->archive_name." to the current schema\n"); $dbw->update( 'oldimage', array( @@ -183,9 +179,6 @@ class OldLocalFile extends LocalFile { 'oi_archive_name' => $this->archive_name ), __METHOD__ ); - - $lb->commitMasterChanges(); - $lb->closeAll(); wfProfileOut( __METHOD__ ); } -- 2.20.1