do not pad for cast expr in mysql mode

This commit is contained in:
18523270951@163.com
2023-06-21 23:12:40 +00:00
committed by ob-robot
parent 7b1027ca62
commit e15d90acc7

View File

@ -8721,8 +8721,7 @@ int anytype_to_varchar_char_explicit(const sql::ObExpr &expr,
} else if (out_acc.get_length() == text_length
|| (ObCharType != out_type && ObNCharType != out_type)
|| (lib::is_mysql_mode()
&& ob_is_char(out_type, expr.datum_meta_.cs_type_)
&& !(SMO_PAD_CHAR_TO_FULL_LENGTH & session->get_sql_mode()))) {
&& ob_is_char(out_type, expr.datum_meta_.cs_type_))) {
// do not padding
LOG_DEBUG("no need to padding", K(ret), K(out_acc.get_length()),
K(text_length), K(text));