From 51c057148c0e2ad6a1511783ec95f42fb82dc29c Mon Sep 17 00:00:00 2001 From: Dmitry Yemanov Date: Tue, 12 Sep 2023 08:32:47 +0300 Subject: [PATCH] Avoid storing garbage in idx_selectivity --- src/jrd/btr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jrd/btr.cpp b/src/jrd/btr.cpp index 68b2aa0a14..49a9d2260f 100644 --- a/src/jrd/btr.cpp +++ b/src/jrd/btr.cpp @@ -533,7 +533,7 @@ bool BTR_description(thread_db* tdbb, jrd_rel* relation, index_root_page* root, idx_desc->idx_selectivity = key_descriptor->irtd_selectivity; ptr += sizeof(irtd); } - idx->idx_selectivity = idx_desc->idx_selectivity; + idx->idx_selectivity = idx->idx_rpt[idx->idx_count - 1].idx_selectivity; if (idx->idx_flags & idx_expressn) {