fix cases master
This commit is contained in:
parent
a8f3622796
commit
f9f6066b8d
@ -3096,6 +3096,12 @@ void ObStringExprOperator::calc_temporal_format_result_length(
|
||||
type.set_varchar();
|
||||
type.set_length(MAX_VARCHAR_BUFFER_SIZE);
|
||||
}
|
||||
if (is_mysql_mode() && ob_is_text_tc(type.get_type())) {
|
||||
const int32_t mbmaxlen = 4;
|
||||
const int32_t default_text_length = ObAccuracy::DDL_DEFAULT_ACCURACY[type.get_type()].get_length() / mbmaxlen;
|
||||
// need to set a correct length for text tc in mysql mode
|
||||
type.set_length(default_text_length);
|
||||
}
|
||||
}
|
||||
|
||||
ObObjType ObStringExprOperator::get_result_type_mysql(int64_t char_length) const
|
||||
|
@ -2960,7 +2960,7 @@ 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 (0 == length) {
|
||||
} else if (share::is_oracle_mode() || 0 == length) {
|
||||
length = default_length;
|
||||
} else if (0 > length) {
|
||||
ret = OB_ERR_TOO_LONG_COLUMN_LENGTH;
|
||||
|
Loading…
x
Reference in New Issue
Block a user