From d84872f075614eac5c96ff87bd207a888e4062f4 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 11 Aug 2016 17:40:35 +0200 Subject: [PATCH] DB IDO: Really do not clear downtimes on checkable upsert refs #12258 refs #12288 --- lib/db_ido/dbevents.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/db_ido/dbevents.cpp b/lib/db_ido/dbevents.cpp index 37b8a1773..65eb6bdf4 100644 --- a/lib/db_ido/dbevents.cpp +++ b/lib/db_ido/dbevents.cpp @@ -441,19 +441,8 @@ void DbEvents::AddDowntimes(const Checkable::Ptr& checkable) { std::set downtimes = checkable->GetDowntimes(); - /* Ensure to delete all downtimes and then insert any or none. - * We must purge obsolete downtimes in the database at all cost. */ - std::vector queries; - DbQuery query1; - query1.Table = "scheduleddowntime"; - query1.Type = DbQueryDelete; - query1.Category = DbCatDowntime; - query1.WhereCriteria = new Dictionary(); - query1.WhereCriteria->Set("object_id", checkable); - queries.push_back(query1); - BOOST_FOREACH(const Downtime::Ptr& downtime, downtimes) { AddDowntimeInternal(queries, downtime, false); } -- 2.40.0