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

Fixed bug CORE-6364 : Wrong reference counting in UDR trigger sample

This commit is contained in:
hvlad 2020-07-13 11:59:49 +03:00
parent 4fdf68274a
commit 204eb60fe7

View File

@ -182,8 +182,8 @@ FB_UDR_BEGIN_TRIGGER(replicate)
strcat(buffer, outSqlDa->sqlvar[0].sqldata + sizeof(short));
strcat(buffer, "';\nend");
IAttachment* attachment = context->getAttachment(status);
ITransaction* transaction = context->getTransaction(status);
AutoRelease<IAttachment> attachment = context->getAttachment(status);
AutoRelease<ITransaction> transaction = context->getTransaction(status);
stmt.reset(attachment->prepare(status, transaction, 0, buffer, SQL_DIALECT_CURRENT, 0));
@ -289,8 +289,8 @@ FB_UDR_BEGIN_TRIGGER(replicate_persons)
strcat(buffer, outSqlDa->sqlvar[0].sqldata + sizeof(short));
strcat(buffer, "';\nend");
IAttachment* attachment = context->getAttachment(status);
ITransaction* transaction = context->getTransaction(status);
AutoRelease<IAttachment> attachment = context->getAttachment(status);
AutoRelease<ITransaction> transaction = context->getTransaction(status);
stmt.reset(attachment->prepare(status, transaction, 0, buffer, SQL_DIALECT_CURRENT, 0));