diff --git a/src/dsql/BoolNodes.cpp b/src/dsql/BoolNodes.cpp index 995bcda7d1..5c6ab28552 100644 --- a/src/dsql/BoolNodes.cpp +++ b/src/dsql/BoolNodes.cpp @@ -1887,6 +1887,7 @@ BoolExprNode* RseBoolNode::convertNeqAllToNotAny(thread_db* tdbb, CompilerScratc andNode->arg2 = rseBoolNode; RseNode* newInnerRse = innerRse->clone(); + newInnerRse->ignoreDbKey(tdbb, csb, csb->csb_view); rseBoolNode = FB_NEW(csb->csb_pool) RseBoolNode(csb->csb_pool, blr_any); rseBoolNode->rse = PAR_make_node(tdbb, 1); diff --git a/src/jrd/RecordSourceNodes.cpp b/src/jrd/RecordSourceNodes.cpp index 55a009f11c..f1cc87b599 100644 --- a/src/jrd/RecordSourceNodes.cpp +++ b/src/jrd/RecordSourceNodes.cpp @@ -242,7 +242,7 @@ RelationSourceNode* RelationSourceNode::copy(thread_db* tdbb, NodeCopier& copier newSource->view = view; CompilerScratch::csb_repeat* element = CMP_csb_element(copier.csb, newSource->stream); - element->csb_relation = (jrd_rel*) newSource->relation; + element->csb_relation = newSource->relation; element->csb_view = newSource->view; element->csb_view_stream = copier.remap[0];