Skip to content

Commit 1d2944c

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 4a4e1e6 commit 1d2944c

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
@@ -156,6 +156,10 @@ namespace
156156
// Create the target (= OLD) context and push it on the stack.
157157
dsql_ctx* targetContext = FB_NEW_POOL(scratch->getPool()) dsql_ctx(scratch->getPool());
158158
*targetContext = *oldContext;
159+
160+
// ASF: dsql_ctx::operator= do not copy ctx_internal_alias.
161+
targetContext->ctx_internal_alias = oldContext->ctx_internal_alias;
162+
159163
targetContext->ctx_flags &= ~CTX_system; // resolve unqualified fields
160164
scratch->context->push(targetContext);
161165

0 commit comments

Comments
 (0)