[icinga-checkins] icinga.org: icinga-api/master: * Oracle fixes for history queries

git at icinga.org git at icinga.org
Tue Jul 12 14:37:07 CEST 2011


Module: icinga-api
Branch: master
Commit: 932c43c5d7112338bf71b1783866bdc06a1e23e3
URL:    https://git.icinga.org/?p=icinga-api.git;a=commit;h=932c43c5d7112338bf71b1783866bdc06a1e23e3

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Jul 12 14:36:52 2011 +0200

* Oracle fixes for history queries

---

 .../data_interfaces/IcingaApiSearchIdoOci8.php     |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php b/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php
index c844145..6f6b23e 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php
@@ -287,7 +287,7 @@ class IcingaApiSearchIdoOci8
 				${FIELDS}
 			from 
 				${TABLE_PREFIX}statehistory sh
-			inner join ${TABLE_PREFIX}objects os on os.id = sh.id and os.objecttype_id = 2
+			inner join ${TABLE_PREFIX}objects os on os.id = sh.object_id and os.objecttype_id = 2
 			inner join ${TABLE_PREFIX}services s on s.service_object_id = os.id
 			${if_table:i,s:inner join ${TABLE_PREFIX}instances i on i.id = s.instance_id}
 			${if_table:oh,s,os:inner join ${TABLE_PREFIX}objects oh on oh.id = s.host_object_id}
@@ -301,7 +301,7 @@ class IcingaApiSearchIdoOci8
 			${if_table:ohg,hg,hgm,oh,s,os:inner join ${TABLE_PREFIX}objects ohg on ohg.id = hg.hostgroup_object_id}
 			${if_table:cvsh,oh,s,os:inner join ${TABLE_PREFIX}customvariablestatus cvsh on oh.id = cvsh.object_id}
 			${if_table:cvss,os:inner join ${TABLE_PREFIX}customvariablestatus cvss on os.id = cvss.object_id}
-			left join ${TABLE_PREFIX}objects osg on os.id = s.service_object_id and osg.is_active = 1
+			left join ${TABLE_PREFIX}objects osg on osg.id = s.service_object_id and osg.is_active = 1
 
 			${FILTER}
 			${GROUPBY}





More information about the icinga-checkins mailing list