8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:43:04 +01:00

Fixed CORE-6408 - RETURNING clause in MERGE cannot reference column in aliased

target table using qualified reference (alias.column) if DELETE action present.
This commit is contained in:
Adriano dos Santos Fernandes 2020-10-27 12:59:47 -03:00
parent b30ff76118
commit 2f3229cc5d

View File

@ -168,6 +168,10 @@ namespace
// Create the target (= OLD) context and push it on the stack.
dsql_ctx* targetContext = FB_NEW_POOL(scratch->getPool()) dsql_ctx(scratch->getPool());
*targetContext = *oldContext;
// ASF: dsql_ctx::operator= do not copy ctx_internal_alias.
targetContext->ctx_internal_alias = oldContext->ctx_internal_alias;
targetContext->ctx_flags &= ~CTX_system; // resolve unqualified fields
scratch->context->push(targetContext);