summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-12-21 09:15:10 +0100
committerGitHub <noreply@github.com>2020-12-21 09:15:10 +0100
commit4973f9b952a6b2b7150283f3339a16e167807206 (patch)
tree8bc761213ebe6dfa0513614b12d1f7dd32a5aa9e /lib
parent97f2de0262601b579b0768863ce664df51eed639 (diff)
parente0e76bb78417161709833bc64eeb4115e713cfdf (diff)
downloadnextcloud-server-4973f9b952a6b2b7150283f3339a16e167807206.tar.gz
nextcloud-server-4973f9b952a6b2b7150283f3339a16e167807206.zip
Merge pull request #24715 from nextcloud/bug/noid/limit-get-incomplete-to-1
Limit getIncomplete query to one row
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Cache.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 2a58f796814..64cd2b25ee5 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -997,7 +997,8 @@ class Cache implements ICache {
->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();