Skip to content

Commit a6d9245

Browse files
committed
Fix problem with LTT ON COMMIT PRESERVE ROWS indexes, reported by Pavel Zotov
1 parent fe1ad53 commit a6d9245

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/jrd/dfw.epp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3727,6 +3727,20 @@ static bool create_ltt_index(thread_db* tdbb, SSHORT phase, DeferredWork* work,
37273727
&lttIndex->id, transaction, selectivity);
37283728
}
37293729

3730+
// Update index on the current instance if it exists
3731+
if (relation->rel_flags & REL_temp_conn)
3732+
{
3733+
AutoSetRestoreFlag<ULONG> dbPageSpace(&tdbb->tdbb_flags, TDBB_use_db_page_space, false);
3734+
3735+
if (relation->getPages(tdbb, 0, false))
3736+
{
3737+
SelectivityList selectivity(*tdbb->getDefaultPool());
3738+
idx.idx_root = 0;
3739+
IDX_create_index(tdbb, relation, &idx, work->getQualifiedName(),
3740+
&lttIndex->id, transaction, selectivity);
3741+
}
3742+
}
3743+
37303744
return false;
37313745
}
37323746

0 commit comments

Comments
 (0)