Merge pull request #6530 from Icinga/bugfix/query-was-empty

IDO/MySQL: avoid empty queries
This commit is contained in:
Michael Friedrich 2018-08-08 14:41:57 +02:00 committed by GitHub
commit ba21a54443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -519,11 +519,12 @@ void IdoMysqlConnection::FinishAsyncQueries()
size_t size_query = aq.Query.GetLength() + 1;
if (num_bytes + size_query > m_MaxPacketSize - 512)
break;
if (count > 0) {
if (num_bytes + size_query > m_MaxPacketSize - 512)
break;
if (count > 0)
querybuf << ";";
}
IncreaseQueryCount();
count++;