From 040650b750192bf9b97066447988d694265c633c Mon Sep 17 00:00:00 2001 From: dimitr Date: Tue, 30 Apr 2013 15:27:51 +0000 Subject: [PATCH] One more bugfix for full outer joins. --- src/jrd/opt.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/jrd/opt.cpp b/src/jrd/opt.cpp index 8393ae9443..950b173ced 100644 --- a/src/jrd/opt.cpp +++ b/src/jrd/opt.cpp @@ -2161,10 +2161,12 @@ static RecordSource* gen_outer(thread_db* tdbb, OptimizerBlk* opt, RseNode* rse, if (!hasOuterRsb) csb->csb_rpt[stream_o.stream_num].deactivate(); + boolean = NULL; + if (!hasInnerRsb) { stream_i.stream_rsb = - gen_retrieval(tdbb, opt, stream_i.stream_num, NULL, false, false, NULL); + gen_retrieval(tdbb, opt, stream_i.stream_num, NULL, true, false, &boolean); } if (!hasOuterRsb) @@ -2176,7 +2178,7 @@ static RecordSource* gen_outer(thread_db* tdbb, OptimizerBlk* opt, RseNode* rse, RecordSource* const outerRsb = gen_residual_boolean(tdbb, opt, stream_o.stream_rsb); RecordSource* const rsb2 = FB_NEW(*tdbb->getDefaultPool()) - NestedLoopJoin(csb, stream_i.stream_rsb, outerRsb, NULL, false, true); + NestedLoopJoin(csb, stream_i.stream_rsb, outerRsb, boolean, false, true); return FB_NEW(*tdbb->getDefaultPool()) FullOuterJoin(csb, rsb1, rsb2); }