8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 10:43:03 +01:00

This should fix CORE-4558: SuperServer dies when client is disconnected abnormally during the index navigational scan.

This commit is contained in:
dimitr 2015-01-17 18:15:12 +00:00
parent e08d63a3e8
commit 5af1459174

View File

@ -5477,9 +5477,12 @@ static void release_attachment(thread_db* tdbb, Attachment* attachment)
#endif
if (dbb->dbb_event_mgr && attachment->att_event_session)
{
dbb->dbb_event_mgr->deleteSession(attachment->att_event_session);
}
// CMP_release() advances the pointer before the deallocation.
jrd_req* request;
while ( (request = attachment->att_requests) )
CMP_release(tdbb, request);
if (attachment->att_id_lock)
LCK_release(tdbb, attachment->att_id_lock);
@ -5493,11 +5496,17 @@ static void release_attachment(thread_db* tdbb, Attachment* attachment)
DSqlCache::Accessor accessor(&attachment->att_dsql_cache);
for (bool getResult = accessor.getFirst(); getResult; getResult = accessor.getNext())
{
LCK_release(tdbb, accessor.current()->second.lock);
}
#endif
detachLocksFromAttachment(attachment);
if (attachment->att_flags & ATT_lck_init_done)
{
LCK_fini(tdbb, LCK_OWNER_attachment);
attachment->att_flags &= ~ATT_lck_init_done;
}
for (vcl** vector = attachment->att_counts; vector < attachment->att_counts + DBB_max_count;
++vector)
{
@ -5510,14 +5519,6 @@ static void release_attachment(thread_db* tdbb, Attachment* attachment)
delete attachment->att_val_errors;
attachment->att_val_errors = NULL;
detachLocksFromAttachment(attachment);
if (attachment->att_flags & ATT_lck_init_done)
{
LCK_fini(tdbb, LCK_OWNER_attachment);
attachment->att_flags &= ~ATT_lck_init_done;
}
delete attachment->att_compatibility_table;
if (attachment->att_dsql_instance)
@ -5527,12 +5528,6 @@ static void release_attachment(thread_db* tdbb, Attachment* attachment)
dbb->deletePool(pool);
}
// CMP_release() advances the pointer before the deallocation.
jrd_req* request;
while ( (request = attachment->att_requests) ) {
CMP_release(tdbb, request);
}
SCL_release_all(attachment->att_security_classes);
delete attachment->att_user;