diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-12-15 23:42:26 +0300 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-12-15 23:42:26 +0300 |
commit | e0e76bb78417161709833bc64eeb4115e713cfdf (patch) | |
tree | 21cf3fbd10ea43738293479d4f14d5233e4223cd /lib/private/Files/Cache | |
parent | 27fdc6575d71a039db75164842263a1ed864ca47 (diff) |
Limit getIncomplete query to one row
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private/Files/Cache')
-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 be44d461933..63c6e4adcd4 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(); |