[CP] fix CHAR and CONCAT result length bug

This commit is contained in:
obdev
2023-01-10 09:08:10 +00:00
committed by ob-robot
parent 9c56a1418b
commit 080ca3a2dd
2 changed files with 4 additions and 5 deletions

View File

@ -208,6 +208,9 @@ int ObExprConcat::calc_result_typeN(ObExprResType &type,
max_len = OB_MAX_LONGTEXT_LENGTH / 4;
} else {
max_len = MIN(OB_MAX_VARCHAR_LENGTH, max_len);
if (max_len <= 0) {
max_len = OB_MAX_VARCHAR_LENGTH;
}
}
type.set_length(max_len);
}