to issue<50039027><49886523>:fix trigger ddl issue & xmltype issue

This commit is contained in:
hanr881
2023-06-02 08:12:20 +00:00
committed by ob-robot
parent 972185dc81
commit 09da9afa27
3 changed files with 16 additions and 1 deletions

View File

@ -2382,7 +2382,11 @@ int ObPLExecState::final(int ret)
if (func_.get_variables().at(i).is_composite_type()
&& i < get_params().count() && get_params().at(i).is_ext()) {
// 纯IN参数直接释放
if (func_.get_in_args().has_member(i) && !func_.get_out_args().has_member(i)) {
// 如果是sql触发的存储过程执行, udf入参处理时不会做深拷, 此处不负责释放入参内存,
// 由对应expr将obj挂到pl ctx上, 解决复杂内存的释放问题
if (func_.get_in_args().has_member(i) && !func_.get_out_args().has_member(i) && is_called_from_sql_) {
// do nothing
} else if (func_.get_in_args().has_member(i) && !func_.get_out_args().has_member(i)) {
if (OB_SUCCESS != (tmp_ret = ObUserDefinedType::destruct_obj(get_params().at(i),
ctx_.exec_ctx_->get_my_session()))) {
LOG_WARN("failed to destruct pl object", K(i), K(tmp_ret));

View File

@ -59,6 +59,7 @@ int ObCreateTriggerExecutor::execute(ObExecContext &ctx, ObCreateTriggerStmt &st
ctx.get_allocator(),
arg));
if (OB_SUCC(ret)) {
arg.ddl_stmt_str_.reset();
OZ (common_rpc_proxy->create_trigger(arg), common_rpc_proxy->get_server());
}
OZ (ctx.get_sql_ctx()->schema_guard_->reset());

View File

@ -488,6 +488,16 @@ int ObCallProcedureResolver::resolve(const ParseNode &parse_tree)
ret = OB_ER_SP_NOT_VAR_ARG;
LOG_USER_ERROR(OB_ER_SP_NOT_VAR_ARG, static_cast<int32_t>(i), static_cast<int32_t>(sp_name.length()), sp_name.ptr());
LOG_WARN("OUT or INOUT argument for routine is not a variable", K(param->get_expr_type()), K(ret));
} else if (lib::is_oracle_mode() &&
param->get_expr_type() != T_OP_GET_USER_VAR &&
param->get_expr_type() != T_QUESTIONMARK &&
param->get_expr_type() != T_OP_GET_PACKAGE_VAR &&
!param->is_obj_access_expr()) {
ret = OB_ERR_CALL_WRONG_ARG;
LOG_WARN("PLS-00306: wrong number or types of arguments in call stmt", K(ret));
} else if (param->is_obj_access_expr() && !(static_cast<const ObObjAccessRawExpr *>(param))->for_write()) {
ret = OB_ERR_CALL_WRONG_ARG;
LOG_WARN("PLS-00306: wrong number or types of arguments in call stmt", K(ret));
} else if (param_info->is_sys_refcursor_type()
|| (param_info->is_pkg_type() && pl_type.is_cursor_type())) {
OZ (call_proc_info->add_out_param(i,