Fix crash in Ido{Mysql,Pgsql}Connection::ExecuteMultipleQueries

fixes #11639
This commit is contained in:
Gunnar Beutner 2016-04-21 09:17:40 +02:00
parent 5c8a31423f
commit cf34aa80f5
2 changed files with 4 additions and 2 deletions

View File

@ -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);
} }

View File

@ -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);
} }