[icinga-checkins] icinga.org: icinga-web/next: SELECT DISTINCT on CLOBs breaks Oracle support

git at icinga.org git at icinga.org
Tue Apr 16 10:02:20 CEST 2013


Module: icinga-web
Branch: next
Commit: f6876e7fb3569b9b151cf6bbe6310bcef7412a91
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=f6876e7fb3569b9b151cf6bbe6310bcef7412a91

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Apr 16 10:01:10 2013 +0200

SELECT DISTINCT on CLOBs breaks Oracle support

Set default distinct to false.

fixes #3965

---

 .../LegacyLayer/TargetModifierModel.class.php      |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
index e958c67..18b9b46 100644
--- a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
+++ b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
@@ -21,7 +21,11 @@
 // -----------------------------------------------------------------------------
 // {{{ICINGA_LICENSE_CODE}}}
 
-
+/**
+ * Class Api_Store_LegacyLayer_TargetModifierModel
+ *
+ * This model is the implementation of the old "IcingaApi" access style
+ */
 class Api_Store_LegacyLayer_TargetModifierModel extends IcingaStoreTargetModifierModel {
     public function resolveColumnAlias($alias) {
         if (isset($this->columns[$alias])) {
@@ -402,8 +406,14 @@ class Api_Store_LegacyLayer_TargetModifierModel extends IcingaStoreTargetModifie
     protected $forceGroup = array();
     protected $resultColumns = array();
 
+    /**
+     * Reset the model into a fresh state
+     */
     public function reset() {
-        $this->setDistinct(true);
+        // Never use distinct as default
+        // produces ORA errors (#3965)
+        $this->setDistinct(false);
+
         $this->defaultJoinType = "inner";
         $this->additionalSelects = array();
         $this->forceGroup = array();





More information about the icinga-checkins mailing list