[icinga-checkins] icinga.org: icinga-core/master: idoutils: move the insert id / sequence stuff into ido2db_query_insert_or_update_notificationdata_add ( refs #3408)

git at icinga.org git at icinga.org
Fri Nov 9 18:21:20 CET 2012


Module: icinga-core
Branch: master
Commit: 90c76776cb5e3be5f23a0fcde3ffc33d312f3489
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=90c76776cb5e3be5f23a0fcde3ffc33d312f3489

Author: Michael Friedrich <michael.friedrich at gmail.com>
Date:   Thu Nov  1 00:33:14 2012 +0100

idoutils: move the insert id / sequence stuff into ido2db_query_insert_or_update_notificationdata_add (refs #3408)

that qualifies the call on dbi_conn_sequence_last (or ocilib ones) just
for valid inserts. for the update, we can copy the safety select from
mysql, and put it in place when mysql/pgsql with libdbi actually did an
update - updating the referenced object id we should return in that
case. 0 is completely invalid, and must be avoided at all cost.

---

 module/idoutils/include/dbqueries.h |    2 +-
 module/idoutils/src/dbhandlers.c    |   58 +------------------
 module/idoutils/src/dbqueries.c     |  109 ++++++++++++++++++++++++++++++++++-
 3 files changed, 109 insertions(+), 60 deletions(-)

Diff:   https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=90c76776cb5e3be5f23a0fcde3ffc33d312f3489




More information about the icinga-checkins mailing list