Skip to content

Commit

Permalink
Fix #7062 - Creation of expression index does not release its stateme…
Browse files Browse the repository at this point in the history
…nt correctly.
  • Loading branch information
asfernandes committed Dec 9, 2021
1 parent 22b867e commit a52e91b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/jrd/dfw.epp
Original file line number Diff line number Diff line change
Expand Up @@ -2810,6 +2810,10 @@ static bool create_expression_index(thread_db* tdbb, SSHORT phase, DeferredWork*
{
tdbb->setTransaction(current_transaction);
tdbb->setRequest(current_request);

// Get rid of the expression statement.
idx.idx_expression_statement->release(tdbb);

throw;
}

Expand All @@ -2818,9 +2822,8 @@ static bool create_expression_index(thread_db* tdbb, SSHORT phase, DeferredWork*

DFW_update_index(work->dfw_name.c_str(), idx.idx_id, selectivity, transaction);

// Get rid of the pool containing the expression tree

attachment->deletePool(new_pool);
// Get rid of the expression statement.
idx.idx_expression_statement->release(tdbb);
}
break;

Expand Down

0 comments on commit a52e91b

Please sign in to comment.