diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-12-21 09:15:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-21 09:15:10 +0100 |
commit | 4973f9b952a6b2b7150283f3339a16e167807206 (patch) | |
tree | 8bc761213ebe6dfa0513614b12d1f7dd32a5aa9e /lib | |
parent | 97f2de0262601b579b0768863ce664df51eed639 (diff) | |
parent | e0e76bb78417161709833bc64eeb4115e713cfdf (diff) | |
download | nextcloud-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.php | 3 |
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(); |