8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:40:38 +01:00

Fixed #6941: Dummy (always true) conditions may change the join order

This commit is contained in:
Dmitry Yemanov 2022-09-17 09:18:20 +03:00
parent 6eb4610bae
commit 26aaddad6d

View File

@ -358,7 +358,8 @@ InversionCandidate* Retrieval::getInversion()
if (setConjunctionsMatched && matched)
iter |= Optimizer::CONJUNCT_MATCHED;
else if (!setConjunctionsMatched && !matched &&
iter->computable(csb, stream, true))
iter->computable(csb, stream, true) &&
iter->containsStream(stream))
{
selectivity *= Optimizer::getSelectivity(*iter);
}