[FEAT MERGE] Fix the error code loss and overwriting issues on the master branch

Co-authored-by: jingtaoye35 <1255153887@qq.com>
Co-authored-by: fkuner <784819644@qq.com>
Co-authored-by: lucky-sinx <2549261744@qq.com>
This commit is contained in:
hwx65
2024-06-17 13:46:15 +00:00
committed by ob-robot
parent 020eae1d2b
commit da5aece3e1
266 changed files with 661 additions and 347 deletions

View File

@ -344,6 +344,7 @@ int ObExprFormat::calc_format_expr(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &
LOG_WARN("fail to build format str", K(ret));
} else if (!ob_is_text_tc(expr.datum_meta_.type_)) {
if (OB_ISNULL(res_buf = expr.get_str_res_mem(ctx, str.length()))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_ERROR("fail to allocate memory", K(buf_len), K(ret));
} else {
MEMCPY(res_buf, str.ptr(), str.length());