Fix failed mysqltests

This commit is contained in:
2149
2023-07-25 15:48:41 +00:00
committed by ob-robot
parent a6e41cc8f2
commit 954ad3683e

View File

@ -1839,10 +1839,16 @@ int ObRawExprUtils::check_deterministic_single(const ObRawExpr *expr,
CK (OB_NOT_NULL(expr));
if (OB_SUCC(ret) && ObResolverUtils::DISABLE_CHECK != check_status) {
if (is_oracle_mode()
&& (T_FUN_SYS_DEFAULT == expr->get_expr_type()
|| T_OP_IS == expr->get_expr_type())) {
&& (ObResolverUtils::CHECK_FOR_GENERATED_COLUMN == check_status
|| ObResolverUtils::CHECK_FOR_FUNCTION_INDEX == check_status)
&& T_OP_IS == expr->get_expr_type()) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "Use special functions in generated columns");
LOG_USER_ERROR(OB_NOT_SUPPORTED, "Use ISNULL() in generated column or functional index");
LOG_WARN("special function is not suppored in generated column", K(ret), KPC(expr));
} else if (is_oracle_mode()
&& T_FUN_SYS_DEFAULT == expr->get_expr_type()) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "Use DEFAULT() in generated column or functional index or check constraint");
LOG_WARN("special function is not suppored in generated column", K(ret), KPC(expr));
} else if (expr->is_sys_func_expr()) {
bool is_non_pure_func = false;