mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 23:23:04 +01:00
Fixed crashes while restoring - reported privately by Alex
This commit is contained in:
parent
ecc7d960c1
commit
266af4e84a
@ -3093,18 +3093,24 @@ static void release_blobs(thread_db* tdbb, jrd_req* request)
|
||||
const ULONG blob_temp_id = request->req_blobs.current();
|
||||
if (transaction->tra_blobs.locate(blob_temp_id)) {
|
||||
BlobIndex *current = &transaction->tra_blobs.current();
|
||||
if (!current->bli_materialized)
|
||||
if (current->bli_materialized)
|
||||
{
|
||||
request->req_blobs.fastRemove();
|
||||
current->bli_request = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Blob was created by request, is accounted for internal needs,
|
||||
// but is not materialized. Get rid of it.
|
||||
BLB_cancel(tdbb, current->bli_blob_object);
|
||||
// Since the routine above modifies req_blobs
|
||||
// we need to reestablish accessor position
|
||||
if (request->req_blobs.locate(Firebird::locGreat, blob_temp_id))
|
||||
continue;
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
if (request->req_blobs.locate(Firebird::locGreat, blob_temp_id))
|
||||
continue;
|
||||
else
|
||||
break;
|
||||
}
|
||||
else {
|
||||
// Blob accounting inconsistent
|
||||
|
Loading…
Reference in New Issue
Block a user