Merge "Fix LocalFileMoveBatch query that was incompatibile with Postgres"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 12 Apr 2018 16:46:06 +0000 (16:46 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 12 Apr 2018 16:46:06 +0000 (16:46 +0000)
includes/filerepo/file/LocalFile.php

index 7fc45eb..0464f07 100644 (file)
@@ -3344,9 +3344,9 @@ class LocalFileMoveBatch {
                        __METHOD__,
                        [ 'FOR UPDATE' ]
                );
-               $oldRowCount = $dbw->selectField(
+               $oldRowCount = $dbw->selectRowCount(
                        'oldimage',
-                       'COUNT(*)',
+                       '*',
                        [ 'oi_name' => $this->oldName ],
                        __METHOD__,
                        [ 'FOR UPDATE' ]