Ido*Connection: extend IsPaused() check where the difference matters

refs #8727
This commit is contained in:
Alexander A. Klimov 2021-04-20 19:04:49 +02:00
parent 92df2ce2ca
commit 3d8586ccec
2 changed files with 5 additions and 5 deletions

View File

@ -147,7 +147,7 @@ void IdoMysqlConnection::Disconnect()
void IdoMysqlConnection::NewTransaction()
{
if (IsPaused())
if (IsPaused() && GetPauseCalled())
return;
#ifdef I2_DEBUG /* I2_DEBUG */
@ -898,7 +898,7 @@ bool IdoMysqlConnection::FieldToEscapedString(const String& key, const Value& va
void IdoMysqlConnection::ExecuteQuery(const DbQuery& query)
{
if (IsPaused())
if (IsPaused() && GetPauseCalled())
return;
ASSERT(query.Category != DbCatInvalid);
@ -1001,7 +1001,7 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
{
AssertOnWorkQueue();
if (IsPaused()) {
if (IsPaused() && GetPauseCalled()) {
DecreasePendingQueries(1);
return;
}

View File

@ -713,7 +713,7 @@ bool IdoPgsqlConnection::FieldToEscapedString(const String& key, const Value& va
void IdoPgsqlConnection::ExecuteQuery(const DbQuery& query)
{
if (IsPaused())
if (IsPaused() && GetPauseCalled())
return;
ASSERT(query.Category != DbCatInvalid);
@ -798,7 +798,7 @@ void IdoPgsqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
{
AssertOnWorkQueue();
if (IsPaused()) {
if (IsPaused() && GetPauseCalled()) {
DecreasePendingQueries(1);
return;
}