Fix duplicate key violation for downtimes

refs #10829
This commit is contained in:
Michael Friedrich 2015-12-16 13:57:29 +01:00 committed by Gunnar Beutner
parent 6a8f97f6ef
commit 187a61dfaa
3 changed files with 3 additions and 1 deletions

View File

@ -474,7 +474,7 @@ void DbEvents::AddDowntime(const Downtime::Ptr& downtime)
void DbEvents::AddDowntimeHistory(const Downtime::Ptr& downtime)
{
std::vector<DbQuery> queries;
AddDowntimeInternal(queries, downtime, false);
AddDowntimeInternal(queries, downtime, true);
DbObject::OnMultipleQueries(queries);
}

View File

@ -821,6 +821,7 @@ void IdoMysqlConnection::InternalExecuteMultipleQueries(const std::vector<DbQuer
if (!CanExecuteQuery(query)) {
m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteMultipleQueries, this, queries), query.Priority);
return;
}
}

View File

@ -699,6 +699,7 @@ void IdoPgsqlConnection::InternalExecuteMultipleQueries(const std::vector<DbQuer
if (!CanExecuteQuery(query)) {
m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalExecuteMultipleQueries, this, queries), query.Priority);
return;
}
}