]> granicus.if.org Git - icinga2/commitdiff
DB IDO: Really do not clear downtimes on checkable upsert
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 11 Aug 2016 15:40:35 +0000 (17:40 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 11 Aug 2016 15:43:39 +0000 (17:43 +0200)
refs #12258
refs #12288

lib/db_ido/dbevents.cpp

index 37b8a17735346da1dcd4e33e0fc63777864b5675..65eb6bdf4e00a2cb85aadb5d9fbee0b4f6b833e6 100644 (file)
@@ -441,19 +441,8 @@ void DbEvents::AddDowntimes(const Checkable::Ptr& checkable)
 {
        std::set<Downtime::Ptr> 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<DbQuery> 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);
        }