Skip to content

Commit e0e1a6d

Browse files
committed
Fix #7062 - Creation of expression index does not release its statement correctly.
1 parent 3a45263 commit e0e1a6d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/jrd/dfw.epp

+6-3
Original file line numberDiff line numberDiff line change
@@ -2810,6 +2810,10 @@ static bool create_expression_index(thread_db* tdbb, SSHORT phase, DeferredWork*
28102810
{
28112811
tdbb->setTransaction(current_transaction);
28122812
tdbb->setRequest(current_request);
2813+
2814+
// Get rid of the expression statement.
2815+
idx.idx_expression_statement->release(tdbb);
2816+
28132817
throw;
28142818
}
28152819

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

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

2821-
// Get rid of the pool containing the expression tree
2822-
2823-
attachment->deletePool(new_pool);
2825+
// Get rid of the expression statement.
2826+
idx.idx_expression_statement->release(tdbb);
28242827
}
28252828
break;
28262829

0 commit comments

Comments
 (0)