fix ret_code err while encode_sortkey_expr allocate memory
This commit is contained in:
@ -150,7 +150,7 @@ int ObExprEncodeSortkey::eval_encode_sortkey(const ObExpr &expr, ObEvalCtx &ctx,
|
|||||||
unsigned char *buf
|
unsigned char *buf
|
||||||
= reinterpret_cast<unsigned char *>(expr.get_str_res_mem(ctx, encode_ctx->max_len_));
|
= reinterpret_cast<unsigned char *>(expr.get_str_res_mem(ctx, encode_ctx->max_len_));
|
||||||
if (OB_ISNULL(buf)) {
|
if (OB_ISNULL(buf)) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||||
LOG_WARN("invalid argument", K(ret), K(encode_ctx->max_len_));
|
LOG_WARN("invalid argument", K(ret), K(encode_ctx->max_len_));
|
||||||
}
|
}
|
||||||
// encode
|
// encode
|
||||||
@ -292,7 +292,7 @@ int ObExprEncodeSortkey::eval_encode_sortkey_batch(const ObExpr &expr,
|
|||||||
unsigned char *buf
|
unsigned char *buf
|
||||||
= reinterpret_cast<unsigned char *>(expr.get_str_res_mem(ctx, encode_ctx->max_len_, i));
|
= reinterpret_cast<unsigned char *>(expr.get_str_res_mem(ctx, encode_ctx->max_len_, i));
|
||||||
if (OB_ISNULL(buf)) {
|
if (OB_ISNULL(buf)) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||||
LOG_WARN("invalid argument", K(ret), K(buf));
|
LOG_WARN("invalid argument", K(ret), K(buf));
|
||||||
}
|
}
|
||||||
bool has_invalid_uni = false;
|
bool has_invalid_uni = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user