mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:03:02 +01:00
Execute ON DISCONNECT triggers in the following cases:
1. During database shutdown (gfix -shut full -force 0). 2. An attachment is deleted from MON$ATTACHMENTS by another attachment. 3. An attachment is closed by idle timeout. ON DISCONNECT triggers will still not be executed during server shutdown.
This commit is contained in:
parent
446d4fa392
commit
d64868cdcd
@ -3313,15 +3313,15 @@ void JAttachment::freeEngineData(CheckStatusWrapper* user_status, bool forceFree
|
|||||||
|
|
||||||
unsigned flags = PURGE_LINGER;
|
unsigned flags = PURGE_LINGER;
|
||||||
|
|
||||||
if (engineShutdown ||
|
if (engineShutdown)
|
||||||
|
flags |= PURGE_FORCE;
|
||||||
|
|
||||||
|
if (forceFree ||
|
||||||
(dbb->dbb_ast_flags & DBB_shutdown) ||
|
(dbb->dbb_ast_flags & DBB_shutdown) ||
|
||||||
(attachment->att_flags & ATT_shutdown))
|
(attachment->att_flags & ATT_shutdown))
|
||||||
{
|
{
|
||||||
flags |= PURGE_FORCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (forceFree)
|
|
||||||
flags |= PURGE_NOCHECK;
|
flags |= PURGE_NOCHECK;
|
||||||
|
}
|
||||||
|
|
||||||
ISC_STATUS reason = 0;
|
ISC_STATUS reason = 0;
|
||||||
if (!forceFree)
|
if (!forceFree)
|
||||||
@ -8603,7 +8603,7 @@ namespace
|
|||||||
{
|
{
|
||||||
// purge attachment, rollback any open transactions
|
// purge attachment, rollback any open transactions
|
||||||
attachment->att_use_count++;
|
attachment->att_use_count++;
|
||||||
purge_attachment(tdbb, sAtt, PURGE_FORCE);
|
purge_attachment(tdbb, sAtt, engineShutdown ? PURGE_FORCE : PURGE_NOCHECK);
|
||||||
}
|
}
|
||||||
catch (const Exception& ex)
|
catch (const Exception& ex)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user