From f551e953383d4027db7e0bbf56b8d4d0a88acbde Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Wed, 10 Mar 2021 09:29:08 +0100 Subject: [PATCH] IDO-MySQL: Make sure InternalNewTransaction() and FinishAsyncQueries() get executed during high load --- lib/db_ido_mysql/idomysqlconnection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp index 65fce5fd7..4015e4d3b 100644 --- a/lib/db_ido_mysql/idomysqlconnection.cpp +++ b/lib/db_ido_mysql/idomysqlconnection.cpp @@ -160,8 +160,7 @@ void IdoMysqlConnection::NewTransaction() << "Scheduling new transaction and finishing async queries."; #endif /* I2_DEBUG */ - m_QueryQueue.Enqueue([this]() { InternalNewTransaction(); }, PriorityNormal); - m_QueryQueue.Enqueue([this]() { FinishAsyncQueries(); }, PriorityNormal); + m_QueryQueue.Enqueue([this]() { InternalNewTransaction(); }, PriorityHigh); } void IdoMysqlConnection::InternalNewTransaction() @@ -175,6 +174,8 @@ void IdoMysqlConnection::InternalNewTransaction() AsyncQuery("COMMIT"); AsyncQuery("BEGIN"); + + FinishAsyncQueries(); } void IdoMysqlConnection::ReconnectTimerHandler()