Fix a bug of omitting to set res type length for lob exprs

This commit is contained in:
obdev
2023-04-13 08:40:19 +00:00
committed by ob-robot
parent 475b0fa975
commit 3926fdba2f
8 changed files with 37 additions and 4 deletions

View File

@ -38,6 +38,7 @@ int ObExprEmptyClob::calc_result_type0(ObExprResType &type, ObExprTypeCtx &type_
UNUSED(type_ctx);
ObSessionNLSParams nls_param = type_ctx.get_session()->get_session_nls_params();
type.set_clob();
type.set_length(0);
type.set_collation_level(CS_LEVEL_IMPLICIT);
type.set_collation_type(nls_param.nls_collation_);
return OB_SUCCESS;
@ -87,6 +88,7 @@ int ObExprEmptyBlob::calc_result_type0(ObExprResType &type, ObExprTypeCtx &type_
{
UNUSED(type_ctx);
type.set_blob();
type.set_length(0);
type.set_collation_type(CS_TYPE_BINARY);
return OB_SUCCESS;
}