diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-09-11 12:11:40 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-09-14 12:14:25 +0200 |
commit | 0e805d53105397aa8edbe4aab53eddc6af359275 (patch) | |
tree | 1a9d98671d5e9655b14b9fae31fc39070f85ef63 | |
parent | 211a2437840ec6897e377a5025f85aec27618263 (diff) | |
download | nextcloud-server-0e805d53105397aa8edbe4aab53eddc6af359275.tar.gz nextcloud-server-0e805d53105397aa8edbe4aab53eddc6af359275.zip |
Do not compare the value on Oracle
As per docs: http://docs.oracle.com/cd/E11882_01/server.112/e26088/conditions002.htm#i1033286
> Large objects (LOBs) are not supported in comparison conditions.
-rw-r--r-- | lib/private/appconfig.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php index 7ee64980fd0..cf2a057f224 100644 --- a/lib/private/appconfig.php +++ b/lib/private/appconfig.php @@ -175,11 +175,21 @@ class AppConfig implements IAppConfig { ->set('configvalue', $sql->createParameter('configvalue')) ->where($sql->expr()->eq('appid', $sql->createParameter('app'))) ->andWhere($sql->expr()->eq('configkey', $sql->createParameter('configkey'))) - ->andWhere($sql->expr()->neq('configvalue', $sql->createParameter('configvalue'))) ->setParameter('configvalue', $value) ->setParameter('app', $app) - ->setParameter('configkey', $key) - ->setParameter('configvalue', $value); + ->setParameter('configkey', $key); + + /* + * Only limit to the existing value for non-Oracle DBs: + * http://docs.oracle.com/cd/E11882_01/server.112/e26088/conditions002.htm#i1033286 + * > Large objects (LOBs) are not supported in comparison conditions. + */ + if (!($this->conn instanceof \OC\DB\OracleConnection)) { + // Only update the value when it is not the same + $sql->andWhere($sql->expr()->neq('configvalue', $sql->createParameter('configvalue'))) + ->setParameter('configvalue', $value); + } + $changedRow = (bool) $sql->execute(); $this->cache[$app][$key] = $value; |