fix mysqltest

This commit is contained in:
akaError
2023-08-14 14:42:37 +00:00
committed by ob-robot
parent f47d591c44
commit 5d0ad0e767
2 changed files with 20 additions and 9 deletions

View File

@ -284,9 +284,17 @@ int ObExprColumnConv::calc_result_typeN(ObExprResType &type,
ret = OB_ERR_INVALID_TYPE_FOR_OP;
LOG_WARN("inconsistent datatypes", "expected", type_tc, "got", value_tc);
} else {
type_ctx.set_cast_mode(
type_ctx.get_cast_mode() | type_ctx.get_raw_expr()->get_extra() | CM_COLUMN_CONVERT
| CM_CHARSET_CONVERT_IGNORE_ERR);
bool is_ddl = const_cast<sql::ObSQLSessionInfo *>(type_ctx.get_session())->get_ddl_info().is_ddl();
if (!is_ddl) {
type_ctx.set_cast_mode(type_ctx.get_cast_mode() |
type_ctx.get_raw_expr()->get_extra() |
CM_COLUMN_CONVERT |
CM_CHARSET_CONVERT_IGNORE_ERR);
} else {
type_ctx.set_cast_mode(type_ctx.get_cast_mode() |
type_ctx.get_raw_expr()->get_extra() |
CM_COLUMN_CONVERT );
}
types[4].set_calc_meta(type);
}
}