Skip to content

Commit

Permalink
Fix duplicate key violation for downtimes
Browse files Browse the repository at this point in the history
refs #10829
  • Loading branch information
Michael Friedrich committed Dec 16, 2015
1 parent 346c0cb commit 6387bec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db_ido/dbevents.cpp
Expand Up @@ -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);
}

Expand Down
1 change: 1 addition & 0 deletions lib/db_ido_mysql/idomysqlconnection.cpp
Expand Up @@ -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;
}
}

Expand Down
1 change: 1 addition & 0 deletions lib/db_ido_pgsql/idopgsqlconnection.cpp
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 6387bec

Please sign in to comment.