Fix duplicate key violation for downtimes

refs #10829
This commit is contained in:
Michael Friedrich 2015-12-16 13:57:29 +01:00
parent 346c0cbb3c
commit 6387bec049
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) void DbEvents::AddDowntimeHistory(const Downtime::Ptr& downtime)
{ {
std::vector<DbQuery> queries; std::vector<DbQuery> queries;
AddDowntimeInternal(queries, downtime, false); AddDowntimeInternal(queries, downtime, true);
DbObject::OnMultipleQueries(queries); DbObject::OnMultipleQueries(queries);
} }

View File

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