mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:03:04 +01:00
Fixed bug CORE-6254 : AV in engine when using SET TRANSACTION and ON TRANSACTION START trigger uses EXECUTE STATEMENT against current transaction
This commit is contained in:
parent
baf8bc1785
commit
7e5b0ce6ac
@ -4916,10 +4916,16 @@ ITransaction* JStatement::execute(CheckStatusWrapper* user_status, ITransaction*
|
||||
}
|
||||
else if (tra && !jt)
|
||||
{
|
||||
apiTra = NULL; // Get ready for correct return in OOM case
|
||||
jt = FB_NEW JTransaction(tra, getAttachment());
|
||||
tra->setInterface(jt);
|
||||
jt->addRef();
|
||||
jt = tra->getInterface(false);
|
||||
if (jt)
|
||||
tra->tra_flags &= ~TRA_own_interface;
|
||||
else
|
||||
{
|
||||
apiTra = NULL; // Get ready for correct return in OOM case
|
||||
jt = FB_NEW JTransaction(tra, getAttachment());
|
||||
tra->setInterface(jt);
|
||||
jt->addRef();
|
||||
}
|
||||
}
|
||||
else if (tra && jt)
|
||||
{
|
||||
@ -5065,10 +5071,16 @@ ITransaction* JAttachment::execute(CheckStatusWrapper* user_status, ITransaction
|
||||
}
|
||||
else if (tra && !jt)
|
||||
{
|
||||
apiTra = NULL; // Get ready for correct return in OOM case
|
||||
jt = FB_NEW JTransaction(tra, getStable());
|
||||
jt->addRef();
|
||||
tra->setInterface(jt);
|
||||
jt = tra->getInterface(false);
|
||||
if (jt)
|
||||
tra->tra_flags &= ~TRA_own_interface;
|
||||
else
|
||||
{
|
||||
apiTra = NULL; // Get ready for correct return in OOM case
|
||||
jt = FB_NEW JTransaction(tra, getStable());
|
||||
jt->addRef();
|
||||
tra->setInterface(jt);
|
||||
}
|
||||
}
|
||||
else if (tra && jt)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user