mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:03: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:
parent
e47eddd0a7
commit
2b0913546f
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user