disable implicit cast between gb18030 and gb18030_2022 when insert

This commit is contained in:
xianyu-w
2023-05-15 04:41:21 +00:00
committed by ob-robot
parent 0ff05b2832
commit b1ef77c953
4 changed files with 22 additions and 0 deletions

View File

@ -265,6 +265,12 @@ int ObExprColumnConv::calc_result_typeN(ObExprResType &type,
type_ctx.set_cast_mode(type_ctx.get_cast_mode() | CM_CHARSET_CONVERT_IGNORE_ERR);
}
if (OB_SUCC(ret) &&
OB_FAIL(ObCharset::check_valid_implicit_convert(types[4].get_collation_type(),
types[1].get_collation_type()))) {
LOG_WARN("failed to check valid implicit convert", K(ret));
}
if (OB_SUCC(ret) && !enumset_to_varchar) {
//cast type when type not same.
const ObObjTypeClass value_tc = ob_obj_type_class(types[4].get_type());