8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:43:02 +01:00

Fixed one more case of bug CORE-5087 : Database shutdown can cause server crash if multiple attachments run EXECUTE STATEMENT

This commit is contained in:
hvlad 2020-06-17 11:08:00 +03:00
parent 1aa3d4de79
commit 416b61b5b6

View File

@ -451,8 +451,6 @@ void InternalStatement::doPrepare(thread_db* tdbb, const string& sql)
}
{
EngineCallbackGuard guard(tdbb, *this, FB_FUNCTION);
CallerName save_caller_name(tran->getHandle()->tra_caller_name);
if (m_callerPrivileges)
@ -488,11 +486,16 @@ void InternalStatement::doPrepare(thread_db* tdbb, const string& sql)
tran->getHandle()->tra_caller_name = CallerName();
}
m_request.assignRefNoIncr(att->prepare(&status, tran, sql.length(), sql.c_str(),
m_connection.getSqlDialect(), 0));
{
EngineCallbackGuard guard(tdbb, *this, FB_FUNCTION);
m_request.assignRefNoIncr(att->prepare(&status, tran, sql.length(), sql.c_str(),
m_connection.getSqlDialect(), 0));
}
m_allocated = (m_request != NULL);
tran->getHandle()->tra_caller_name = save_caller_name;
if (tran->getHandle())
tran->getHandle()->tra_caller_name = save_caller_name;
}
if (status->getState() & IStatus::STATE_ERRORS)