diff --git a/src/jrd/RecordSourceNodes.cpp b/src/jrd/RecordSourceNodes.cpp index ea6780dad1..21ede05665 100644 --- a/src/jrd/RecordSourceNodes.cpp +++ b/src/jrd/RecordSourceNodes.cpp @@ -85,16 +85,19 @@ namespace if (const auto cmpNode = nodeAs(boolean)) { - SortedStreamList streams; - cmpNode->collectStreams(streams); - - for (const auto stream : streams) + if (cmpNode->blrOp == blr_eql || cmpNode->blrOp == blr_equiv) { - if (!rseStreams.exist(stream)) + SortedStreamList streams; + cmpNode->collectStreams(streams); + + for (const auto stream : streams) { - booleanStack.push(boolean); - *parentBoolean = nullptr; - return true; + if (!rseStreams.exist(stream)) + { + booleanStack.push(boolean); + *parentBoolean = nullptr; + return true; + } } } }