[CP] to issue<47821611>:fix package cursor default expr issue
This commit is contained in:
parent
43b3c03021
commit
e70bd3e209
@ -183,6 +183,8 @@ int ObPLPackage::instantiate_package_state(const ObPLResolveCtx &resolve_ctx,
|
||||
if (var_type.is_cursor_type()
|
||||
&& OB_FAIL(resolve_ctx.session_info_.init_cursor_cache())) {
|
||||
LOG_WARN("failed to init cursor cache", K(ret));
|
||||
} else if (var->is_formal_param()) {
|
||||
// cursor formal param will as variable added to symbol, skip cursor formal param init
|
||||
} else if (OB_FAIL(var_type.init_session_var(resolve_ctx,
|
||||
var_type.is_cursor_type() ?
|
||||
package_state.get_pkg_cursor_allocator()
|
||||
|
@ -6670,7 +6670,8 @@ int ObPLResolver::resolve_cursor_formal_param(
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(current_block_->get_namespace().add_symbol(param_name, param_type, default_expr))) {
|
||||
if (OB_FAIL(current_block_->get_namespace().add_symbol(param_name, param_type, default_expr,
|
||||
false, false, false, true))) {
|
||||
LOG_WARN("failed to add symbol", K(param_name), K(param_type), K(default_expr), K(ret));
|
||||
} else if (OB_FAIL(params.push_back(current_block_->get_namespace().get_symbol_table()->get_count() - 1))) {
|
||||
LOG_WARN("push back error", K(params), K(param_type), K(default_expr), K(ret));
|
||||
|
@ -42,6 +42,8 @@ int ObPLVar::deep_copy(const ObPLVar &var, ObIAllocator &allocator)
|
||||
is_default_construct_ = var.is_default_construct();
|
||||
default_ = var.get_default();
|
||||
is_dup_declare_ = var.is_dup_declare();
|
||||
is_formal_param_ = var.is_formal_param();
|
||||
is_referenced_ = var.is_referenced();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user