dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "rdbms: add IDatabase::lockForUpdate() convenience method"
[lhc/web/wiklou.git]
/
includes
/
filerepo
/
file
/
LocalFile.php
diff --git
a/includes/filerepo/file/LocalFile.php
b/includes/filerepo/file/LocalFile.php
index
7206dce
..
742d78d
100644
(file)
--- a/
includes/filerepo/file/LocalFile.php
+++ b/
includes/filerepo/file/LocalFile.php
@@
-3344,19
+3344,15
@@
class LocalFileMoveBatch {
$status = $repo->newGood();
$dbw = $this->db;
$status = $repo->newGood();
$dbw = $this->db;
- $hasCurrent = $dbw->
selectField
(
+ $hasCurrent = $dbw->
lockForUpdate
(
'image',
'image',
- '1',
[ 'img_name' => $this->oldName ],
[ 'img_name' => $this->oldName ],
- __METHOD__,
- [ 'FOR UPDATE' ]
+ __METHOD__
);
);
- $oldRowCount = $dbw->
selectRowCount
(
+ $oldRowCount = $dbw->
lockForUpdate
(
'oldimage',
'oldimage',
- '*',
[ 'oi_name' => $this->oldName ],
[ 'oi_name' => $this->oldName ],
- __METHOD__,
- [ 'FOR UPDATE' ]
+ __METHOD__
);
if ( $hasCurrent ) {
);
if ( $hasCurrent ) {