https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114228
Revision: 114228
Author: aaron
Date: 2012-03-20 00:57:18 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
[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: trunk/phase3/includes/filerepo/file/LocalFile.php
===================================================================
--- trunk/phase3/includes/filerepo/file/LocalFile.php 2012-03-20 00:31:29 UTC
(rev 114227)
+++ trunk/phase3/includes/filerepo/file/LocalFile.php 2012-03-20 00:57:18 UTC
(rev 114228)
@@ -1444,7 +1444,8 @@
$this->locked++;
}
- return $dbw->selectField( 'image', '1', array( 'img_name' =>
$this->getName() ), __METHOD__ );
+ return $dbw->selectField( 'image', '1',
+ array( 'img_name' => $this->getName() ), __METHOD__,
array( 'FOR UPDATE' ) );
}
/**
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs