Fix type deduce error causing hang

This commit is contained in:
obdev
2023-02-24 16:12:46 +00:00
committed by ob-robot
parent 37b1fc0e66
commit aa35526e4f

View File

@ -160,7 +160,7 @@ int ObExprFormat::calc_result_type(ObExprResType &type, ObExprResType *type_arra
} }
case ObVarcharType: case ObVarcharType:
case ObCharType: { case ObCharType: {
int32_t length = type_array[0].get_length(); int32_t length = ori_type.get_length();
if (length <= MAX_VARCHAR_BUFFER_SIZE) { if (length <= MAX_VARCHAR_BUFFER_SIZE) {
type.set_varchar(); type.set_varchar();
int64_t max_sep_count = (length / 3) + /*decimals*/1 + /*sign*/1; int64_t max_sep_count = (length / 3) + /*decimals*/1 + /*sign*/1;