This commit is contained in:
wjhh2008
2023-08-10 08:18:36 +00:00
committed by ob-robot
parent dcd54c9a7b
commit a0e110cc8a
10 changed files with 59 additions and 34 deletions

View File

@ -256,7 +256,7 @@ int ObExprSubstr::calc_result_typeN(ObExprResType &type,
types_array[i].set_calc_type(ObIntType);
}
}
if (OB_SUCC(ret) && type.is_varchar()) {
if (OB_SUCC(ret) && !ob_is_text_tc(type.get_type())) {
// Set cast mode for integer parameters, truncate string to integer.
// see: ObExprSubstr::cast_param_type_for_mysql
OX(type_ctx.set_cast_mode(type_ctx.get_cast_mode() | CM_STRING_INTEGER_TRUNC));