mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 08:43:03 +01:00
Fixed CORE-5645 - Wrong transaction can be passed to external engine.
This commit is contained in:
parent
b6b61218b2
commit
4226f7cb4b
@ -630,21 +630,16 @@ void ExtEngineManager::ExternalContextImpl::releaseTransaction()
|
||||
|
||||
void ExtEngineManager::ExternalContextImpl::setTransaction(thread_db* tdbb)
|
||||
{
|
||||
jrd_tra* newTransaction = tdbb->getTransaction();
|
||||
ITransaction* newTransaction = tdbb->getTransaction() ? tdbb->getTransaction()->getInterface(true) : NULL;
|
||||
|
||||
if (newTransaction == internalTransaction)
|
||||
return;
|
||||
|
||||
releaseTransaction();
|
||||
fb_assert(!externalTransaction);
|
||||
fb_assert(!externalTransaction && !internalTransaction);
|
||||
|
||||
if ((internalTransaction = newTransaction))
|
||||
{
|
||||
internalTransaction->getInterface(true)->addRef();
|
||||
|
||||
externalTransaction = MasterInterfacePtr()->registerTransaction(externalAttachment,
|
||||
internalTransaction->getInterface(true));
|
||||
}
|
||||
externalTransaction = MasterInterfacePtr()->registerTransaction(externalAttachment, internalTransaction);
|
||||
}
|
||||
|
||||
IMaster* ExtEngineManager::ExternalContextImpl::getMaster()
|
||||
|
@ -166,7 +166,7 @@ private:
|
||||
private:
|
||||
Firebird::IExternalEngine* engine;
|
||||
Attachment* internalAttachment;
|
||||
jrd_tra* internalTransaction;
|
||||
Firebird::ITransaction* internalTransaction;
|
||||
Firebird::IAttachment* externalAttachment;
|
||||
Firebird::ITransaction* externalTransaction;
|
||||
Firebird::GenericMap<Firebird::NonPooled<int, void*> > miscInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user