8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:43:02 +01:00

Fixed index navigation in inner joins.

This commit is contained in:
Dmitry Yemanov 2022-04-04 10:44:45 +03:00
parent bb77ba2644
commit 6cb8eacb9a

View File

@ -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))