Skip to content

Commit 2f3229c

Browse files
committed
Fixed CORE-6408 - RETURNING clause in MERGE cannot reference column in aliased
target table using qualified reference (alias.column) if DELETE action present.
1 parent b30ff76 commit 2f3229c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/dsql/StmtNodes.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ namespace
168168
// Create the target (= OLD) context and push it on the stack.
169169
dsql_ctx* targetContext = FB_NEW_POOL(scratch->getPool()) dsql_ctx(scratch->getPool());
170170
*targetContext = *oldContext;
171+
172+
// ASF: dsql_ctx::operator= do not copy ctx_internal_alias.
173+
targetContext->ctx_internal_alias = oldContext->ctx_internal_alias;
174+
171175
targetContext->ctx_flags &= ~CTX_system; // resolve unqualified fields
172176
scratch->context->push(targetContext);
173177

0 commit comments

Comments
 (0)