]> granicus.if.org Git - icinga2/commit
IDO: Ensure that the notification insert id is passed to contactnotification inserts
authorMichael Friedrich <michael.friedrich@netways.de>
Mon, 21 Mar 2016 12:37:32 +0000 (13:37 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Apr 2016 08:07:24 +0000 (10:07 +0200)
commit0cbedf495a49ed4d8c123313b1f1aaa685cd2e33
tree35019aee89883b958933dafa2431d12baab493b0
parent45786e2b81224f1308c299f5dd9b22261acf8655
IDO: Ensure that the notification insert id is passed to contactnotification inserts

We cannot add the notification insert id directly
to the following contactnotifications queries. Instead
we need to pass a DbValue reference which gets set after
the notification insert id is calculated.
The contactnotifications insert queries are fired as query
group calling CanExecuteQuery() and FieldToEscapedString().
If the notification id does not exist yet, the queries are
moved to the end of the queue.
Once the contactnotifications queries are fired the DbValue
reference is destroyed.

This patch also removes the old notification insert id cache
which was broken in many ways.

fixes #11387
lib/db_ido/dbconnection.cpp
lib/db_ido/dbconnection.hpp
lib/db_ido/dbevents.cpp
lib/db_ido/dbquery.hpp
lib/db_ido/dbvalue.cpp
lib/db_ido/dbvalue.hpp
lib/db_ido_mysql/idomysqlconnection.cpp
lib/db_ido_pgsql/idopgsqlconnection.cpp
lib/icinga/notification.cpp