From: Michael Friedrich Date: Wed, 16 Dec 2015 12:57:29 +0000 (+0100) Subject: Fix duplicate key violation for downtimes X-Git-Tag: v2.4.2~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=187a61dfaa9da1e608b22ce1791a88ab5d4da349;p=icinga2 Fix duplicate key violation for downtimes refs #10829 --- diff --git a/lib/db_ido/dbevents.cpp b/lib/db_ido/dbevents.cpp index b15e94e9d..d9dbd3355 100644 --- a/lib/db_ido/dbevents.cpp +++ b/lib/db_ido/dbevents.cpp @@ -474,7 +474,7 @@ void DbEvents::AddDowntime(const Downtime::Ptr& downtime) void DbEvents::AddDowntimeHistory(const Downtime::Ptr& downtime) { std::vector queries; - AddDowntimeInternal(queries, downtime, false); + AddDowntimeInternal(queries, downtime, true); DbObject::OnMultipleQueries(queries); } diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp index 23c5bdb1f..56ed3a0f0 100644 --- a/lib/db_ido_mysql/idomysqlconnection.cpp +++ b/lib/db_ido_mysql/idomysqlconnection.cpp @@ -821,6 +821,7 @@ void IdoMysqlConnection::InternalExecuteMultipleQueries(const std::vector