[CP] add error code when alloc memory failed
This commit is contained in:
@ -55,6 +55,7 @@ int ObExprFromBase64::calc(ObObj &result,
|
||||
int64_t pos = 0;
|
||||
char *output_buf = static_cast<char*>(allocator->alloc(buf_len));
|
||||
if (OB_ISNULL(output_buf)) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_WARN("output_buf is null", K(ret), K(buf_len), K(in_raw_len));
|
||||
result.set_null();
|
||||
} else if (OB_FAIL(ObBase64Encoder::decode(buf, in_raw_len,
|
||||
|
||||
@ -362,6 +362,7 @@ int ObExprOracleDecode::calc_result_type_for_literal(ObExprResType &type,
|
||||
} else if (OB_FAIL(ObSQLUtils::get_default_cast_mode(session, expr_ctx.cast_mode_))) {
|
||||
LOG_WARN("failed to get default cast mode", K(ret));
|
||||
} else if (OB_ISNULL(obj_stack = static_cast<ObObj*>(allocator.alloc(sizeof(ObObj) * param_num)))) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_WARN("failed to alloc obj stack", K(ret));
|
||||
} else {
|
||||
expr_ctx.my_session_ = const_cast<ObSQLSessionInfo *>(session);
|
||||
|
||||
Reference in New Issue
Block a user