mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 15:23:03 +01:00
Revert "Better (methinks) inversion choice when the OR condition includes a node which is also matched directly"
This reverts commit ebcd4dde64
.
This commit is contained in:
parent
29873bc712
commit
5167c588a4
@ -1496,35 +1496,19 @@ InversionCandidate* Retrieval::makeInversion(InversionCandidateList& inversions)
|
|||||||
|
|
||||||
// Look if a match is already used by previous matches.
|
// Look if a match is already used by previous matches.
|
||||||
bool anyMatchAlreadyUsed = false, matchUsedByNavigation = false;
|
bool anyMatchAlreadyUsed = false, matchUsedByNavigation = false;
|
||||||
if (currentInv->boolean)
|
for (const auto currentMatch : currentInv->matches)
|
||||||
{
|
{
|
||||||
if (matches.exist(currentInv->boolean))
|
if (matches.exist(currentMatch))
|
||||||
{
|
{
|
||||||
anyMatchAlreadyUsed = true;
|
anyMatchAlreadyUsed = true;
|
||||||
|
|
||||||
if (navigationCandidate &&
|
if (navigationCandidate &&
|
||||||
navigationCandidate->matches.exist(currentInv->boolean))
|
navigationCandidate->matches.exist(currentMatch))
|
||||||
{
|
{
|
||||||
matchUsedByNavigation = true;
|
matchUsedByNavigation = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (const auto currentMatch : currentInv->matches)
|
|
||||||
{
|
|
||||||
if (matches.exist(currentMatch))
|
|
||||||
{
|
|
||||||
anyMatchAlreadyUsed = true;
|
|
||||||
|
|
||||||
if (navigationCandidate &&
|
break;
|
||||||
navigationCandidate->matches.exist(currentMatch))
|
|
||||||
{
|
|
||||||
matchUsedByNavigation = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user