From 187a61dfaa9da1e608b22ce1791a88ab5d4da349 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 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