to issue<50039027><49886523>:fix trigger ddl issue & xmltype issue
This commit is contained in:
@ -2382,7 +2382,11 @@ int ObPLExecState::final(int ret)
|
|||||||
if (func_.get_variables().at(i).is_composite_type()
|
if (func_.get_variables().at(i).is_composite_type()
|
||||||
&& i < get_params().count() && get_params().at(i).is_ext()) {
|
&& i < get_params().count() && get_params().at(i).is_ext()) {
|
||||||
// 纯IN参数直接释放
|
// 纯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),
|
if (OB_SUCCESS != (tmp_ret = ObUserDefinedType::destruct_obj(get_params().at(i),
|
||||||
ctx_.exec_ctx_->get_my_session()))) {
|
ctx_.exec_ctx_->get_my_session()))) {
|
||||||
LOG_WARN("failed to destruct pl object", K(i), K(tmp_ret));
|
LOG_WARN("failed to destruct pl object", K(i), K(tmp_ret));
|
||||||
|
|||||||
@ -59,6 +59,7 @@ int ObCreateTriggerExecutor::execute(ObExecContext &ctx, ObCreateTriggerStmt &st
|
|||||||
ctx.get_allocator(),
|
ctx.get_allocator(),
|
||||||
arg));
|
arg));
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
|
arg.ddl_stmt_str_.reset();
|
||||||
OZ (common_rpc_proxy->create_trigger(arg), common_rpc_proxy->get_server());
|
OZ (common_rpc_proxy->create_trigger(arg), common_rpc_proxy->get_server());
|
||||||
}
|
}
|
||||||
OZ (ctx.get_sql_ctx()->schema_guard_->reset());
|
OZ (ctx.get_sql_ctx()->schema_guard_->reset());
|
||||||
|
|||||||
@ -488,6 +488,16 @@ int ObCallProcedureResolver::resolve(const ParseNode &parse_tree)
|
|||||||
ret = OB_ER_SP_NOT_VAR_ARG;
|
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_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));
|
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()
|
} else if (param_info->is_sys_refcursor_type()
|
||||||
|| (param_info->is_pkg_type() && pl_type.is_cursor_type())) {
|
|| (param_info->is_pkg_type() && pl_type.is_cursor_type())) {
|
||||||
OZ (call_proc_info->add_out_param(i,
|
OZ (call_proc_info->add_out_param(i,
|
||||||
|
|||||||
Reference in New Issue
Block a user