Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2020-12-15 23:42:26 +0300
committerDaniel Kesselberg <mail@danielkesselberg.de>2020-12-15 23:42:26 +0300
commite0e76bb78417161709833bc64eeb4115e713cfdf (patch)
tree21cf3fbd10ea43738293479d4f14d5233e4223cd /lib/private/Files/Cache
parent27fdc6575d71a039db75164842263a1ed864ca47 (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.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 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();