[icinga-checkins] icinga.org: icinga-core/mfriedrich/ido: idoutils: fix last sequence number return value

git at icinga.org git at icinga.org
Fri Jul 22 14:50:57 CEST 2011


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

Author: Thomas Dressler <tdressler at tdressler.net>
Date:   Fri Jul  1 12:26:18 2011 +0200

idoutils: fix last sequence number return value

---

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

diff --git a/module/idoutils/src/db.c b/module/idoutils/src/db.c
index 1879a9f..09905fc 100644
--- a/module/idoutils/src/db.c
+++ b/module/idoutils/src/db.c
@@ -3051,7 +3051,7 @@ int ido2db_oci_prepared_statement_sequence_select(ido2db_idi *idi) {
 
         ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "%s() start\n",fname);
 
-        if(asprintf(&buf, "SELECT last_number from user_sequences where sequence_name=upper(:X1)") == -1) {
+        if(asprintf(&buf, "SELECT last_number-1 from user_sequences where sequence_name=upper(:X1)") == -1) {
         	ido2db_log_debug_info(IDO2DB_DEBUGL_SQL, 2, "%s Error:memory allocation failed\n",fname);
                 buf = NULL;
                 return IDO_ERROR;





More information about the icinga-checkins mailing list