[CP] [CP] add max_partition_num config in mysql mode
This commit is contained in:
@ -14521,7 +14521,9 @@ int ObDDLService::check_alter_add_partitions(const share::schema::ObTableSchema
|
||||
ret = OB_ERR_ONLY_ON_RANGE_LIST_PARTITION;
|
||||
LOG_WARN("add partition can only be used on RANGE/LIST partitions", K(ret), K(alter_table_arg));
|
||||
} else if ((is_oracle_mode && OB_MAX_PARTITION_NUM_ORACLE < orig_table_schema.get_all_part_num() + inc_part_num)
|
||||
|| (!is_oracle_mode && OB_MAX_PARTITION_NUM_MYSQL < orig_table_schema.get_all_part_num() + inc_part_num)) {
|
||||
|| (!is_oracle_mode
|
||||
&& ObResolverUtils::get_mysql_max_partition_num(orig_table_schema.get_tenant_id())
|
||||
< orig_table_schema.get_all_part_num() + inc_part_num)) {
|
||||
ret = OB_TOO_MANY_PARTITIONS_ERROR;
|
||||
LOG_WARN("too many partitions", K(ret),
|
||||
"partition cnt current", orig_table_schema.get_all_part_num(),
|
||||
@ -14650,7 +14652,9 @@ int ObDDLService::check_alter_add_subpartitions(const share::schema::ObTableSche
|
||||
ret = OB_ERR_ONLY_ON_RANGE_LIST_PARTITION;
|
||||
LOG_WARN("add partition can only be used on RANGE/LIST partitions", K(ret), K(alter_table_arg));
|
||||
} else if ((is_oracle_mode && OB_MAX_PARTITION_NUM_ORACLE < orig_table_schema.get_all_part_num() + part_num)
|
||||
|| (!is_oracle_mode && OB_MAX_PARTITION_NUM_MYSQL < orig_table_schema.get_all_part_num() + part_num)) {
|
||||
|| (!is_oracle_mode
|
||||
&& ObResolverUtils::get_mysql_max_partition_num(orig_table_schema.get_tenant_id())
|
||||
< orig_table_schema.get_all_part_num() + part_num)) {
|
||||
ret = OB_TOO_MANY_PARTITIONS_ERROR;
|
||||
LOG_WARN("too many partitions", K(ret),
|
||||
"partition cnt current", orig_table_schema.get_all_part_num(),
|
||||
|
||||
Reference in New Issue
Block a user