[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: hard fix not modular sequence for timeperiod_timeranges in oracle

git at icinga.org git at icinga.org
Mon Aug 1 10:55:33 CEST 2011


Module: icinga-core
Branch: mfriedrich/core
Commit: 1a843164a679ba3f13a9ce5dcb897ad3067a2937
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=1a843164a679ba3f13a9ce5dcb897ad3067a2937

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Thu Jul 28 14:35:25 2011 +0200

hard fix not modular sequence for timeperiod_timeranges in oracle

needs a proper, more modular implementation

---

 module/idoutils/src/dbhandlers.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/module/idoutils/src/dbhandlers.c b/module/idoutils/src/dbhandlers.c
index 8fec012..c5dbef6 100644
--- a/module/idoutils/src/dbhandlers.c
+++ b/module/idoutils/src/dbhandlers.c
@@ -7584,8 +7584,7 @@ int ido2db_handle_timeperiodefinition(ido2db_idi *idi) {
 #ifdef USE_ORACLE /* Oracle ocilib specific */
  
         /* build a multiple insert value array */
-        if(asprintf(&buf1, "INSERT INTO %s (id, instance_id, timeperiod_id, day, start_sec, end_sec) SELECT seq_%s.nextval, x1, x2, x3, x4, x5 from (",
-                        ido2db_db_tablenames[IDO2DB_DBTABLE_TIMEPERIODTIMERANGES],
+        if(asprintf(&buf1, "INSERT INTO %s (id, instance_id, timeperiod_id, day, start_sec, end_sec) SELECT seq_timep_timer.nextval, x1, x2, x3, x4, x5 from (",
                         ido2db_db_tablenames[IDO2DB_DBTABLE_TIMEPERIODTIMERANGES]
                         )==-1)
                 buf1=NULL;





More information about the icinga-checkins mailing list