提交 0becd6e9 编写于 作者: R renju96 提交者: ob-robot

Fix errcode to be compatible with mysql

上级 98d57f60
......@@ -3367,8 +3367,13 @@ int ObDDLService::check_convert_to_character(obrpc::ObAlterTableArg &alter_table
alter_table_schema.set_collation_type(collation_type);
alter_table_schema.set_charset_type(charset_type);
} else if (!ObCharset::is_valid_collation(charset_type, collation_type)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("invalid charset", K(ret), K(charset_type), K(collation_type));
ret = OB_ERR_COLLATION_MISMATCH;
const char *cs_name = ObCharset::charset_name(charset_type);
const char *coll_name = ObCharset::collation_name(collation_type);
ObString charset = ObString::make_string(cs_name);
ObString collation = ObString::make_string(coll_name);
LOG_USER_ERROR(OB_ERR_COLLATION_MISMATCH, collation.length(), collation.ptr(),
charset.length(), charset.ptr());
}
// This is to do a performance optimization. If the collation_type of the original table is
// equivalent to the new collation_type, do nothing
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册