fix ret_code err while encode_sortkey_expr allocate memory

This commit is contained in:
obdev
2023-02-21 08:42:14 +00:00
committed by ob-robot
parent 6454081e6e
commit 16885fe829

View File

@ -150,7 +150,7 @@ int ObExprEncodeSortkey::eval_encode_sortkey(const ObExpr &expr, ObEvalCtx &ctx,
unsigned char *buf
= reinterpret_cast<unsigned char *>(expr.get_str_res_mem(ctx, encode_ctx->max_len_));
if (OB_ISNULL(buf)) {
ret = OB_ERR_UNEXPECTED;
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("invalid argument", K(ret), K(encode_ctx->max_len_));
}
// encode
@ -292,7 +292,7 @@ int ObExprEncodeSortkey::eval_encode_sortkey_batch(const ObExpr &expr,
unsigned char *buf
= reinterpret_cast<unsigned char *>(expr.get_str_res_mem(ctx, encode_ctx->max_len_, i));
if (OB_ISNULL(buf)) {
ret = OB_ERR_UNEXPECTED;
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("invalid argument", K(ret), K(buf));
}
bool has_invalid_uni = false;