From 784f7bd8a6f500b3d428a84be2354a56f478cf10 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 00e7d95747..9302e95525 100644 --- a/src/jrd/btr.cpp +++ b/src/jrd/btr.cpp @@ -962,7 +962,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; ISC_STATUS error = 0; if (idx->idx_flags & idx_expression)