aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar aldot <aldot@5e8054f6-fb45-0410-9d17-f830fe724320>2009-04-21 09:57:23 +0000
committerGravatar aldot <aldot@5e8054f6-fb45-0410-9d17-f830fe724320>2009-04-21 09:57:23 +0000
commit9f2bd0731cd9d3e67a76ff67bce0337653722a4e (patch)
tree7cd8edc7cc351ef243937ce1df66df6d1ed515da
parentfd2cb2d4fb874b145377c9db20722ade807623fb (diff)
downloadndoutils-oracle-9f2bd0731cd9d3e67a76ff67bce0337653722a4e.tar.gz
ndoutils-oracle-9f2bd0731cd9d3e67a76ff67bce0337653722a4e.tar.bz2
- remove dead code
git-svn-id: https://www.nagiosforge.org/svn/ndoutils_oracle/trunk/ndoutils-1.4b7-oracle@87 5e8054f6-fb45-0410-9d17-f830fe724320
-rw-r--r--src/dbhandlers.c121
1 files changed, 0 insertions, 121 deletions
diff --git a/src/dbhandlers.c b/src/dbhandlers.c
index 768218e..5b4e27c 100644
--- a/src/dbhandlers.c
+++ b/src/dbhandlers.c
@@ -3553,127 +3553,6 @@ int ndo2db_handle_servicestatusdata(ndo2db_idi *idi){
result=ndo2db_db_query(idi,buf);
free(buf);
#else
- /* Unique constraint, upon match with these columns an UPDATE takes place, an INSERT otherwise */
-/*
- if(asprintf(&buf1, "service_object_id='%lu'"
- ,object_id
- )==-1)
- buf1=NULL;
-*/
- /* Values to set when updating */
-/*
- if(asprintf(&buf2, "instance_id='%lu', status_update_time=%s, output='%s', perfdata='%s', current_state='%d', has_been_checked='%d', should_be_scheduled='%d', current_check_attempt='%d', max_check_attempts='%d', last_check=%s, next_check=%s, check_type='%d', last_state_change=%s, last_hard_state_change=%s, last_hard_state='%d', last_time_ok=%s, last_time_warning=%s, last_time_unknown=%s, last_time_critical=%s, state_type='%d', last_notification=%s, next_notification=%s, no_more_notifications='%d', notifications_enabled='%d', problem_has_been_acknowledged='%d', acknowledgement_type='%d', current_notification_number='%d', passive_checks_enabled='%d', active_checks_enabled='%d', event_handler_enabled='%d', flap_detection_enabled='%d', is_flapping='%d', percent_state_change='%lf', latency='%lf', execution_time='%lf', scheduled_downtime_depth='%d', failure_prediction_enabled='%d', process_performance_data='%d', obsess_over_service='%d', modified_service_attributes='%lu', event_handler='%s', check_command='%s', normal_check_interval='%lf', retry_check_interval='%lf', check_timeperiod_object_id='%lu'"
- ,idi->dbinfo.instance_id
- ,ts[0]
- ,es[0]
- ,es[1]
- ,current_state
- ,has_been_checked
- ,should_be_scheduled
- ,current_check_attempt
- ,max_check_attempts
- ,ts[1]
- ,ts[2]
- ,check_type
- ,ts[3]
- ,ts[4]
- ,last_hard_state
- ,ts[5]
- ,ts[6]
- ,ts[7]
- ,ts[8]
- ,state_type
- ,ts[9]
- ,ts[10]
- ,no_more_notifications
- ,notifications_enabled
- ,problem_has_been_acknowledged
- ,acknowledgement_type
- ,current_notification_number
- ,passive_checks_enabled
- ,active_checks_enabled
- ,event_handler_enabled
- ,flap_detection_enabled
- ,is_flapping
- ,percent_state_change
- ,latency
- ,execution_time
- ,scheduled_downtime_depth
- ,failure_prediction_enabled
- ,process_performance_data
- ,obsess_over_service
- ,modified_service_attributes
- ,es[2]
- ,es[3]
- ,normal_check_interval
- ,retry_check_interval
- ,check_timeperiod_object_id
- )==-1)
- buf2=NULL;
-*/
- /* the data part of the INSERT statement */
-/*
- if(asprintf(&buf3,"(instance_id, service_object_id, status_update_time, output, perfdata, current_state, has_been_checked, should_be_scheduled, current_check_attempt, max_check_attempts, last_check, next_check, check_type, last_state_change, last_hard_state_change, last_hard_state, last_time_ok, last_time_warning, last_time_unknown, last_time_critical, state_type, last_notification, next_notification, no_more_notifications, notifications_enabled, problem_has_been_acknowledged, acknowledgement_type, current_notification_number, passive_checks_enabled, active_checks_enabled, event_handler_enabled, flap_detection_enabled, is_flapping, percent_state_change, latency, execution_time, scheduled_downtime_depth, failure_prediction_enabled, process_performance_data, obsess_over_service, modified_service_attributes, event_handler, check_command, normal_check_interval, retry_check_interval, check_timeperiod_object_id) VALUES ('%lu', '%lu', %s, '%s', '%s', '%d', '%d', '%d', '%d', '%d', %s, %s, '%d', %s, %s, '%d', %s, %s, %s, %s, '%d', %s, %s, '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%lf', '%lf', '%lf', '%d', '%d', '%d', '%d', '%lu', '%s', '%s', '%lf', '%lf', '%lu')"
- ,idi->dbinfo.instance_id
- ,object_id
- ,ts[0]
- ,es[0]
- ,es[1]
- ,current_state
- ,has_been_checked
- ,should_be_scheduled
- ,current_check_attempt
- ,max_check_attempts
- ,ts[1]
- ,ts[2]
- ,check_type
- ,ts[3]
- ,ts[4]
- ,last_hard_state
- ,ts[5]
- ,ts[6]
- ,ts[7]
- ,ts[8]
- ,state_type
- ,ts[9]
- ,ts[10]
- ,no_more_notifications
- ,notifications_enabled
- ,problem_has_been_acknowledged
- ,acknowledgement_type
- ,current_notification_number
- ,passive_checks_enabled
- ,active_checks_enabled
- ,event_handler_enabled
- ,flap_detection_enabled
- ,is_flapping
- ,percent_state_change
- ,latency
- ,execution_time
- ,scheduled_downtime_depth
- ,failure_prediction_enabled
- ,process_performance_data
- ,obsess_over_service
- ,modified_service_attributes
- ,es[2]
- ,es[3]
- ,normal_check_interval
- ,retry_check_interval
- ,check_timeperiod_object_id
- )==-1)
- buf3=NULL;
-
- if(asprintf(&buf,"MERGE INTO %s USING DUAL ON (%s) WHEN MATCHED THEN UPDATE SET %s WHEN NOT MATCHED THEN INSERT %s"
- ,ndo2db_db_tablenames[NDO2DB_DBTABLE_SERVICESTATUS]
- ,buf1
- ,buf2
- ,buf3
- )==-1)
- buf=NULL;
- free(buf1);
- free(buf2);
- free(buf3);
-*/
void *data[46];
data[0] = (void *) &idi->dbinfo.instance_id;