summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-11-07 16:55:13 +0100
committerGitHub <noreply@github.com>2020-11-07 16:55:13 +0100
commita5fa9604babdab101357016066ed72b4fcab1d21 (patch)
tree2f504c000776379353ab786ed82b605660c5e19f /lib/private/Files
parentcad2369e0b0d9619b1c715e2912f68de07e7de1e (diff)
parentd9e471771a000952eae6147bab52813bb429b80b (diff)
downloadnextcloud-server-a5fa9604babdab101357016066ed72b4fcab1d21.tar.gz
nextcloud-server-a5fa9604babdab101357016066ed72b4fcab1d21.zip
Merge pull request #23923 from nextcloud/bugfix/oci/fix-greatest-order-for-oracle
Fix greatest/least order for oracle
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/Cache/Propagator.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Files/Cache/Propagator.php b/lib/private/Files/Cache/Propagator.php
index c9200d33b11..97eaa839ccf 100644
--- a/lib/private/Files/Cache/Propagator.php
+++ b/lib/private/Files/Cache/Propagator.php
@@ -104,9 +104,9 @@ class Propagator implements IPropagator {
$builder = $this->connection->getQueryBuilder();
$builder->update('filecache')
->set('size', $builder->func()->greatest(
- $builder->createNamedParameter(-1, IQueryBuilder::PARAM_INT),
- $builder->func()->add('size', $builder->createNamedParameter($sizeDifference)))
- )
+ $builder->func()->add('size', $builder->createNamedParameter($sizeDifference)),
+ $builder->createNamedParameter(-1, IQueryBuilder::PARAM_INT)
+ ))
->where($builder->expr()->eq('storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
->andWhere($builder->expr()->in('path_hash', $hashParams))
->andWhere($builder->expr()->gt('size', $builder->expr()->literal(-1, IQueryBuilder::PARAM_INT)));
@@ -168,7 +168,7 @@ class Propagator implements IPropagator {
$storageId = (int)$this->storage->getStorageCache()->getNumericId();
$query->update('filecache')
- ->set('mtime', $query->createFunction('GREATEST(' . $query->getColumnName('mtime') . ', ' . $query->createParameter('time') . ')'))
+ ->set('mtime', $query->func()->greatest('mtime', $query->createParameter('time')))
->set('etag', $query->expr()->literal(uniqid()))
->where($query->expr()->eq('storage', $query->expr()->literal($storageId, IQueryBuilder::PARAM_INT)))
->andWhere($query->expr()->eq('path_hash', $query->createParameter('hash')));