From bb352fb667e87ea0829f1da5f9e85c34bdefe9fa Mon Sep 17 00:00:00 2001 From: Joas Schilling <coding@schilljs.com> Date: Fri, 19 Oct 2018 16:44:28 +0200 Subject: Use the defined func()->count() instead of manual counting Signed-off-by: Joas Schilling <coding@schilljs.com> --- lib/private/Lock/DBLockingProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Lock') diff --git a/lib/private/Lock/DBLockingProvider.php b/lib/private/Lock/DBLockingProvider.php index 6adb7488217..0c5f4fa2010 100644 --- a/lib/private/Lock/DBLockingProvider.php +++ b/lib/private/Lock/DBLockingProvider.php @@ -303,7 +303,7 @@ class DBLockingProvider extends AbstractLockingProvider { $builder = $this->connection->getQueryBuilder(); $query = $builder->update('file_locks') - ->set('lock', $builder->createFunction('`lock` -1')) + ->set('lock', $builder->func()->subtract('lock', $builder->expr()->literal(1))) ->where($builder->expr()->in('key', $builder->createNamedParameter($chunk, IQueryBuilder::PARAM_STR_ARRAY))) ->andWhere($builder->expr()->gt('lock', new Literal(0))); -- cgit v1.2.3