mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 22:43:03 +01:00
Fixed #7446: Attempt to use data in destroyed transaction pool
This commit is contained in:
parent
cb368b2a1c
commit
6c431cb465
@ -6048,9 +6048,12 @@ static bool make_version(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_
|
||||
|
||||
defaultRequest->validateTimeStamp();
|
||||
|
||||
TRA_attach_request(transaction, defaultRequest);
|
||||
dsc* result = EVL_expr(tdbb, defaultRequest, defaultNode);
|
||||
TRA_detach_request(defaultRequest);
|
||||
dsc* result = nullptr;
|
||||
{ // scope
|
||||
Firebird::Cleanup detach([&defaultRequest] {TRA_detach_request(defaultRequest);});
|
||||
TRA_attach_request(transaction, defaultRequest);
|
||||
result = EVL_expr(tdbb, defaultRequest, defaultNode);
|
||||
}
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
@ -1005,13 +1005,6 @@ void EXE_unwind(thread_db* tdbb, Request* request)
|
||||
|
||||
request->req_sorts.unlinkAll();
|
||||
|
||||
if (request->req_proc_sav_point && (request->req_flags & req_proc_fetch))
|
||||
{
|
||||
// Release savepoints used by this request
|
||||
Savepoint::destroy(request->req_proc_sav_point);
|
||||
fb_assert(!request->req_proc_sav_point);
|
||||
}
|
||||
|
||||
TRA_release_request_snapshot(tdbb, request);
|
||||
TRA_detach_request(request);
|
||||
|
||||
|
@ -237,6 +237,14 @@ void TRA_detach_request(Jrd::Request* request)
|
||||
|
||||
// Release stored looper savepoints
|
||||
Savepoint::destroy(request->req_savepoints);
|
||||
fb_assert(!request->req_savepoints);
|
||||
|
||||
// Release procedure savepoints used by this request
|
||||
if (request->req_proc_sav_point && (request->req_flags & req_proc_fetch))
|
||||
{
|
||||
Savepoint::destroy(request->req_proc_sav_point);
|
||||
fb_assert(!request->req_proc_sav_point);
|
||||
}
|
||||
|
||||
// Remove request from the doubly linked list
|
||||
if (request->req_tra_next)
|
||||
|
Loading…
Reference in New Issue
Block a user