mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:43:02 +01:00
Fixed crash when run test bugs.core_5329 in Classic mode using debug build.
This commit is contained in:
parent
9b0ac5c52a
commit
90e2b3035c
@ -219,6 +219,8 @@ private:
|
||||
DsqlBatch* batch;
|
||||
Firebird::RefPtr<JStatement> statement;
|
||||
Firebird::RefPtr<Firebird::IMessageMetadata> m_meta;
|
||||
|
||||
void freeEngineData(Firebird::CheckStatusWrapper* status);
|
||||
};
|
||||
|
||||
class JStatement FB_FINAL :
|
||||
|
@ -5583,16 +5583,53 @@ int JBatch::release()
|
||||
|
||||
if (batch)
|
||||
{
|
||||
/*
|
||||
Attachment* att = getAttachment()->getHandle();
|
||||
if (att)
|
||||
att->deregisterBatch(this);
|
||||
delete batch;
|
||||
*/
|
||||
|
||||
LocalStatus status;
|
||||
CheckStatusWrapper statusWrapper(&status);
|
||||
|
||||
freeEngineData(&statusWrapper);
|
||||
|
||||
}
|
||||
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void JBatch::freeEngineData(Firebird::CheckStatusWrapper* user_status)
|
||||
{
|
||||
try
|
||||
{
|
||||
EngineContextHolder tdbb(user_status, this, FB_FUNCTION);
|
||||
check_database(tdbb);
|
||||
|
||||
try
|
||||
{
|
||||
Attachment* att = getAttachment()->getHandle();
|
||||
if (att)
|
||||
att->deregisterBatch(this);
|
||||
delete batch;
|
||||
}
|
||||
catch (const Exception& ex)
|
||||
{
|
||||
transliterateException(tdbb, ex, user_status, FB_FUNCTION);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (const Exception& ex)
|
||||
{
|
||||
ex.stuffException(user_status);
|
||||
return;
|
||||
}
|
||||
|
||||
successful_completion(user_status);
|
||||
}
|
||||
|
||||
|
||||
void JBatch::add(CheckStatusWrapper* status, unsigned count, const void* inBuffer)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user