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

Bugfix for CORE-5307: Random 'invalid transaction handle' errors are returned from the engine.

This commit is contained in:
Dmitry Yemanov 2016-07-13 18:46:26 +03:00
parent 8f02eb08bb
commit 946c8ef115
3 changed files with 7 additions and 4 deletions

View File

@ -171,7 +171,7 @@ void blb::BLB_check_well_formed(Jrd::thread_db* tdbb, const dsc* desc)
}
void blb::BLB_close(thread_db* tdbb)
bool blb::BLB_close(thread_db* tdbb)
{
/**************************************
*
@ -183,6 +183,7 @@ void blb::BLB_close(thread_db* tdbb)
* Close a blob. If the blob is open for retrieval, release the
* blob block. If it's a temporary blob, flush out the last page
* (if necessary) in preparation for materialization.
* Return true if the blob was physically destroyed.
*
**************************************/
@ -198,7 +199,7 @@ void blb::BLB_close(thread_db* tdbb)
if (!(blb_flags & BLB_temporary))
{
destroy(true);
return;
return true;
}
if (blb_level == 0)
@ -222,6 +223,7 @@ void blb::BLB_close(thread_db* tdbb)
}
freeBuffer();
return false;
}

View File

@ -98,7 +98,7 @@ public:
void BLB_cancel(thread_db* tdbb);
void BLB_check_well_formed(thread_db*, const dsc* desc);
void BLB_close(thread_db*);
bool BLB_close(thread_db*);
static blb* create(thread_db*, jrd_tra*, bid*);
static blb* create2(thread_db*, jrd_tra*, bid*, USHORT, const UCHAR*, bool = false);
static Jrd::blb* get_array(Jrd::thread_db*, Jrd::jrd_tra*, const Jrd::bid*, Ods::InternalArrayDesc*);

View File

@ -2134,7 +2134,8 @@ void JBlob::close(CheckStatusWrapper* user_status)
try
{
getHandle()->BLB_close(tdbb);
if (!getHandle()->BLB_close(tdbb))
getHandle()->blb_interface = NULL;
blob = NULL;
}
catch (const Exception& ex)