mirror of https://github.com/Icinga/icinga2.git
Fix crash in Ido{Mysql,Pgsql}Connection::ExecuteMultipleQueries
fixes #11639
This commit is contained in:
parent
d1e6cdf62c
commit
4a32211de2
|
@ -775,7 +775,8 @@ void IdoMysqlConnection::ExecuteQuery(const DbQuery& query)
|
||||||
|
|
||||||
void IdoMysqlConnection::ExecuteMultipleQueries(const std::vector<DbQuery>& queries)
|
void IdoMysqlConnection::ExecuteMultipleQueries(const std::vector<DbQuery>& queries)
|
||||||
{
|
{
|
||||||
ASSERT(!queries.empty());
|
if (queries.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteMultipleQueries, this, queries), queries[0].Priority, true);
|
m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteMultipleQueries, this, queries), queries[0].Priority, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -654,7 +654,8 @@ void IdoPgsqlConnection::ExecuteQuery(const DbQuery& query)
|
||||||
|
|
||||||
void IdoPgsqlConnection::ExecuteMultipleQueries(const std::vector<DbQuery>& queries)
|
void IdoPgsqlConnection::ExecuteMultipleQueries(const std::vector<DbQuery>& queries)
|
||||||
{
|
{
|
||||||
ASSERT(!queries.empty());
|
if (queries.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalExecuteMultipleQueries, this, queries), queries[0].Priority, true);
|
m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalExecuteMultipleQueries, this, queries), queries[0].Priority, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue