From 4b1896712901ee0c4e71a25c8e1dd3dc18d63c46 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 5 Jun 2014 12:19:48 +0200 Subject: [PATCH] Hack around oracle for CLOB fields --- lib/private/preferences.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/private/preferences.php b/lib/private/preferences.php index f1de95a5e11..0dc5b26810a 100644 --- a/lib/private/preferences.php +++ b/lib/private/preferences.php @@ -254,7 +254,15 @@ class Preferences { $query = 'SELECT `userid` ' . ' FROM `*PREFIX*preferences` ' - . ' WHERE `appid` = ? AND `configkey` = ? AND `configvalue` = ?'; + . ' WHERE `appid` = ? AND `configkey` = ? AND '; + + if (\OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') { + //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison + $query .= ' to_char(`configvalue`)= ?'; + } else { + $query .= ' `configvalue` = ?'; + } + $result = $this->conn->executeQuery($query, array($app, $key, $value)); while ($row = $result->fetch()) { -- 2.39.5