add inner_same_as for udf func and remove useless GET_MIN_CLUSTER_VERSION

This commit is contained in:
Larry955
2022-11-16 07:35:39 +00:00
committed by wangzelin.wzl
parent 99d34dc07b
commit 8aee7d972f
34 changed files with 279 additions and 527 deletions

View File

@ -728,11 +728,7 @@ int ObAdminZoneExecutor::execute(ObExecContext &ctx, ObAdminZoneStmt &stmt)
}
} else {} // force stop, no need to wait leader switch
} else if (ObAdminZoneArg::MODIFY == stmt.get_op()) {
if (GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_1440) {
ret = OB_OP_NOT_ALLOW;
LOG_USER_ERROR(OB_OP_NOT_ALLOW, "cannot alter zone during cluster updating to 143");
LOG_INFO("alter zone during cluster upgrading to version 1.4.3");
} else if (OB_FAIL(common_proxy->alter_zone(arg))) {
if (OB_FAIL(common_proxy->alter_zone(arg))) {
LOG_WARN("common rpc proxy alter zone failed", K(arg), K(ret));
}
} else {

View File

@ -53,8 +53,7 @@ int ObAnalyzeExecutor::execute(ObExecContext &ctx, ObAnalyzeStmt &stmt)
in_restore))) {
LOG_WARN("failed to check tenant is restore", K(ret));
} else if (OB_UNLIKELY(in_restore) ||
GCTX.is_standby_cluster() ||
GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_3200) {
GCTX.is_standby_cluster()) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "analyze table during restore or standby cluster");
} else if (OB_FAIL(stmt.fill_table_stat_param(ctx, param))) {

View File

@ -912,9 +912,6 @@ int ObAlterTableExecutor::execute(ObExecContext &ctx, ObAlterTableStmt &stmt)
|| (obrpc::ObAlterTableArg::ALTER_CONSTRAINT_STATE == alter_table_arg.alter_constraint_type_))) {
if (OB_FAIL(need_check_constraint_validity(alter_table_arg, need_check))) {
LOG_WARN("check whether need check failed", K(ret));
} else if (need_check && GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_0_0_0) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "Such ddl operation during upgrade");
}
}
// 如果追加 validate 属性的外键或者 modify 外键为 validate 属性时,不立即生效
@ -927,8 +924,7 @@ int ObAlterTableExecutor::execute(ObExecContext &ctx, ObAlterTableStmt &stmt)
need_modify_fk_validate = true;
}
}
if (OB_SUCC(ret)
&& (GET_MIN_CLUSTER_VERSION() >= CLUSTER_VERSION_3100)) {
if (OB_SUCC(ret)) {
if (OB_FAIL(alter_table_rpc_v2(
alter_table_arg,
res,
@ -938,17 +934,6 @@ int ObAlterTableExecutor::execute(ObExecContext &ctx, ObAlterTableStmt &stmt)
is_sync_ddl_user))) {
LOG_WARN("Failed to alter table rpc v2", K(ret));
}
} else if (OB_SUCC(ret)
&& (GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_3100)) {
if (OB_FAIL(alter_table_rpc_v1(
alter_table_arg,
res,
allocator,
common_rpc_proxy,
my_session,
is_sync_ddl_user))) {
LOG_WARN("Failed to alter table rpc v1", K(ret));
}
}
}
}