[CP] Fix logging core when casting obj in-place failed

This commit is contained in:
hezuojiao 2022-11-28 06:10:36 +00:00 committed by ob-robot
parent 08b4bcce4d
commit f54c4341a1

View File

@ -290,15 +290,16 @@ int OB_INLINE ObExprOperator::cast_operand_type(common::ObObj &res_obj,
} else if (lib::is_mysql_mode() && ob_is_json(calc_type)) {
cast_ctx.dest_collation_ = CS_TYPE_UTF8MB4_BIN;
}
// FIXME: (xiaochu) 就地修改obj类型算法没问题吧?
ObObj res_obj_copy = res_obj;
ObObj tmp_obj;
cast_ctx.expect_obj_collation_ = cast_ctx.dest_collation_;
if (OB_FAIL(ObObjCaster::to_type(res_type.get_calc_type(),
cast_ctx,
res_obj_copy,
res_obj))) {
res_obj,
tmp_obj))) {
LOG_WARN("fail to convert type", K(ret),
K(res_type.get_calc_type()), K(res_obj));
} else {
res_obj = tmp_obj;
}
if (OB_SUCC(ret)
&& ob_is_string_or_lob_type(param_type)