mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 17:23:03 +01:00
Fixed index navigation in inner joins.
This commit is contained in:
parent
bb77ba2644
commit
6cb8eacb9a
@ -304,7 +304,6 @@ void InnerJoin::findBestOrder(unsigned position,
|
||||
// Do some initializations
|
||||
tail->activate();
|
||||
joinedStreams[position].number = stream->stream;
|
||||
position++;
|
||||
|
||||
// Save the various flag bits from the optimizer block to reset its
|
||||
// state after each test
|
||||
@ -322,6 +321,8 @@ void InnerJoin::findBestOrder(unsigned position,
|
||||
newCardinality = positionCardinality * cardinality;
|
||||
}
|
||||
|
||||
position++;
|
||||
|
||||
// If the partial order is either longer than any previous partial order,
|
||||
// or the same length and cheap, save order as "best"
|
||||
if (position > bestCount || (position == bestCount && newCost < bestCost))
|
||||
|
Loading…
Reference in New Issue
Block a user