From 43da5b0b2bb03fb3f89b8de00c0096556fef38d9 Mon Sep 17 00:00:00 2001 From: Simon Spannagel Date: Sun, 29 Jan 2023 15:14:19 +0100 Subject: [PATCH] RepairStep for unencrypted size: make DB query more efficient Signed-off-by: Simon Spannagel --- lib/private/Repair/RepairUnencryptedSize.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/Repair/RepairUnencryptedSize.php b/lib/private/Repair/RepairUnencryptedSize.php index be91934821185..08f4455a7d2d7 100644 --- a/lib/private/Repair/RepairUnencryptedSize.php +++ b/lib/private/Repair/RepairUnencryptedSize.php @@ -45,8 +45,8 @@ public function run(IOutput $output) { $update = $this->connection->getQueryBuilder(); $update->update('filecache') ->set('unencrypted_size', "0") - ->where($update->expr()->eq('encrypted', "0", IQueryBuilder::PARAM_INT)) - ->andWhere($update->expr()->neq('unencrypted_size', "0", IQueryBuilder::PARAM_INT)); + ->where($update->expr()->gt('unencrypted_size', "0", IQueryBuilder::PARAM_INT)) + ->andWhere($update->expr()->eq('encrypted', "0", IQueryBuilder::PARAM_INT)); if ($update->execute()) { $output->info('Fixed file size of unencrypted files');