From 6387bec049c02aba120ce8385259b7254f02ba4c Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 16 Dec 2015 13:57:29 +0100 Subject: [PATCH] Fix duplicate key violation for downtimes refs #10829 --- lib/db_ido/dbevents.cpp | 2 +- lib/db_ido_mysql/idomysqlconnection.cpp | 1 + lib/db_ido_pgsql/idopgsqlconnection.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/db_ido/dbevents.cpp b/lib/db_ido/dbevents.cpp index 1035a7e6e..9679bc2fe 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 3a20e47ac..7df26049e 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