Skip to content

Commit

Permalink
Limit getIncomplete query to one row
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
  • Loading branch information
kesselb committed Dec 15, 2020
1 parent 27fdc65 commit e0e76bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,8 @@ public function getIncomplete() {
->from('filecache')
->whereStorageId()
->andWhere($query->expr()->lt('size', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
->orderBy('fileid', 'DESC');
->orderBy('fileid', 'DESC')
->setMaxResults(1);

$result = $query->execute();
$path = $result->fetchColumn();
Expand Down

0 comments on commit e0e76bb

Please sign in to comment.