fix mysqltest

This commit is contained in:
obdev
2022-11-08 09:38:05 +00:00
committed by wangzelin.wzl
parent 1b9815163f
commit 9166a2cd26
2 changed files with 7 additions and 5 deletions

View File

@ -282,7 +282,8 @@ int ObUserDefinedType::deep_copy_obj(
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
switch (src.get_meta().get_extend_type()) { switch (src.get_meta().get_extend_type()) {
case PL_CURSOR_TYPE: { case PL_CURSOR_TYPE:
case PL_REF_CURSOR_TYPE: {
OZ (ObRefCursorType::deep_copy_cursor(allocator, src, dst)); OZ (ObRefCursorType::deep_copy_cursor(allocator, src, dst));
} }
break; break;

View File

@ -509,15 +509,16 @@ int ObExprUDF::eval_udf(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &res)
// OZ(after_calc_result(schema_guard, sql_ctx, ctx.exec_ctx_)); // OZ(after_calc_result(schema_guard, sql_ctx, ctx.exec_ctx_));
throw; throw;
} }
if (OB_SUCC(ret)) { if (OB_FAIL(ret)) {
} else if (info->is_called_in_sql_) {
if (tmp_result.is_pl_extend()) { if (tmp_result.is_pl_extend()) {
OZ (pl::ObUserDefinedType::deep_copy_obj(alloc, tmp_result, result, true)); OZ (pl::ObUserDefinedType::deep_copy_obj(alloc, tmp_result, result, true));
} else { } else {
OZ (deep_copy_obj(alloc, tmp_result, result)); OZ (deep_copy_obj(alloc, tmp_result, result));
} }
if (info->is_called_in_sql_) {
OX (ctx.exec_ctx_.get_pl_ctx()->reset_obj()); OX (ctx.exec_ctx_.get_pl_ctx()->reset_obj());
} } else {
result = tmp_result;
} }
if (OB_SUCC(ret) && info->is_udt_cons_) { if (OB_SUCC(ret) && info->is_udt_cons_) {
pl::ObPLComposite *obj_self = reinterpret_cast<pl::ObPLRecord *>(udf_params->at(0).get_ext()); pl::ObPLComposite *obj_self = reinterpret_cast<pl::ObPLRecord *>(udf_params->at(0).get_ext());