Skip to content

Commit

Permalink
Fixed bug CORE-6364 : Wrong reference counting in UDR trigger sample
Browse files Browse the repository at this point in the history
  • Loading branch information
hvlad committed Jul 13, 2020
1 parent 4fdf682 commit 204eb60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/udr/Triggers.cpp
Expand Up @@ -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));

Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit 204eb60

Please sign in to comment.