r114228 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114227‎ | r114228 | r114229 >
Date:00:57, 20 March 2012
Author:aaron
Status:ok
Tags:
Comment:
[FileRepo] Added long-since missing FOR UPDATE to LocalFile::lock(). This might help with the weird mismatched metadata for files with two uploads at the same time that I keep seeing in the DB.
Modified paths:
  • /trunk/phase3/includes/filerepo/file/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/file/LocalFile.php
@@ -1444,7 +1444,8 @@
14451445 $this->locked++;
14461446 }
14471447
1448 - return $dbw->selectField( 'image', '1', array( 'img_name' => $this->getName() ), __METHOD__ );
 1448+ return $dbw->selectField( 'image', '1',
 1449+ array( 'img_name' => $this->getName() ), __METHOD__, array( 'FOR UPDATE' ) );
14491450 }
14501451
14511452 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r114285MFT r114228aaron17:29, 20 March 2012

Status & tagging log