From e960884939c56541d6755f7c84a03a09fc24fdbf Mon Sep 17 00:00:00 2001 From: 0xacc Date: Mon, 1 Apr 2024 06:50:41 +0000 Subject: [PATCH] [CP] [to #55674640] fix MERGE INTO + table function returns -4007 --- src/sql/resolver/dml/ob_merge_resolver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sql/resolver/dml/ob_merge_resolver.cpp b/src/sql/resolver/dml/ob_merge_resolver.cpp index de99e81c40..5c74126a12 100644 --- a/src/sql/resolver/dml/ob_merge_resolver.cpp +++ b/src/sql/resolver/dml/ob_merge_resolver.cpp @@ -352,6 +352,9 @@ int ObMergeResolver::resolve_table(const ParseNode &parse_tree, TableItem *&tabl ret = OB_INVALID_ARGUMENT; LOG_WARN("invalid argument", K(ret)); } + ObStmtScope scope_backup = current_scope_; + current_scope_ = T_FROM_SCOPE; + DEFER(current_scope_ = scope_backup); OZ (resolve_function_table_item(*table_node, table_item)); break; }