fix mysqltest

This commit is contained in:
obdev
2023-08-25 10:40:29 +00:00
committed by ob-robot
parent d57362eb97
commit f4eb080a84

View File

@ -1846,12 +1846,14 @@ int ObCreateTableResolver::resolve_table_elements_from_select(const ParseNode &p
(ObRawExpr::EXPR_CONST == expr->get_expr_class() || (ObRawExpr::EXPR_CONST == expr->get_expr_class() ||
(ObRawExpr::EXPR_OPERATOR == expr->get_expr_class() && (ObRawExpr::EXPR_OPERATOR == expr->get_expr_class() &&
expr->is_static_const_expr())) && expr->is_static_const_expr())) &&
!expr->get_result_type().is_null() && !expr->get_result_type().is_null()) {
!expr->get_result_type().is_datetime()) { common::ObObjType result_type = expr->get_result_type().get_obj_meta().get_type();
if (ob_is_numeric_type(result_type) || ob_is_string_tc(result_type) || ob_is_time_tc(result_type)) {
common::ObObj zero_obj(0); common::ObObj zero_obj(0);
if (OB_FAIL(column.set_cur_default_value(zero_obj))) { if (OB_FAIL(column.set_cur_default_value(zero_obj))) {
LOG_WARN("set default value failed", K(ret)); LOG_WARN("set default value failed", K(ret));
} }
}
} else { /*do nothing*/ } } else { /*do nothing*/ }
} }
if (OB_SUCC(ret) && ObResolverUtils::is_restore_user(*session_info_) if (OB_SUCC(ret) && ObResolverUtils::is_restore_user(*session_info_)