fix cases 3.1_opensource_release

This commit is contained in:
xf0
2021-08-11 16:06:01 +08:00
committed by wangzelin.wzl
parent 78f8c06a35
commit 358b847936
3 changed files with 1614 additions and 1590 deletions

View File

@ -2960,8 +2960,14 @@ int ObDDLResolver::check_text_length(ObCharsetType cs_type, ObCollationType co_t
} else if (0 == mbmaxlen) {
ret = OB_ERR_UNEXPECTED;
SQL_RESV_LOG(ERROR, "mbmaxlen can not be 0", K(ret), K(co_type), K(mbmaxlen));
} else if (length < 0) {
} else if (0 == length) {
length = default_length;
} else if (0 > length) {
ret = OB_ERR_TOO_LONG_COLUMN_LENGTH;
LOG_USER_ERROR(OB_ERR_TOO_LONG_COLUMN_LENGTH, name,
static_cast<int>(ObAccuracy::DDL_DEFAULT_ACCURACY[ObLongTextType].get_length() / mbmaxlen));
SQL_RESV_LOG(WARN, "fail to check column data length",
K(ret), K(length), K(ObAccuracy::DDL_DEFAULT_ACCURACY[ObLongTextType].get_length()), K(mbmaxlen));
} else {
// eg. text(128) will be tinytext in mysql, and text(65537) will be mediumtext
if (ObTextType == type) {