8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 01:23:03 +01:00

Fix for the optimizer issue with compound indices. Leave it up to Arno to decide whether this fix is correct or not.

This commit is contained in:
dimitr 2003-01-11 18:02:17 +00:00
parent e47eddd0a7
commit 2b0913546f

View File

@ -4134,7 +4134,16 @@ static RSB gen_retrieval(TDBB tdbb,
/* Mark all conjuncts that could be calculated against the
index as used. For example if you have nod1 >= con2 and nod2 <= con2 */
for (j = 0; j < count; j++) {
matching_nodes[j]->opt_flags |= opt_matched;
idx_tail = matching_nodes[j];
idx_end = idx_tail + idx->idx_count;
for (idx_tail = opt->opt_rpt ;idx_tail < idx_end &&
(idx_tail->opt_lower || idx_tail->opt_upper); idx_tail++) {
for (tail = opt->opt_rpt; tail < opt_end; tail++) {
if (idx_tail->opt_match == tail->opt_conjunct) {
tail->opt_flags |= opt_matched;
}
}
}
}
}