disable alter partition of materialized view

This commit is contained in:
leftgeek
2024-05-11 11:07:45 +00:00
committed by ob-robot
parent d0d5ec59fd
commit a47f4d3026
3 changed files with 14 additions and 6 deletions

View File

@ -31,9 +31,9 @@ public:
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
if (NULL == array) { if (NULL == array) {
ret = OB_INVALID_ARGUMENT; ret = OB_INVALID_ARGUMENT;
} else if (OB_FAIL(bitset_.reserve(array->count()))) { } else if (OB_FAIL(bitset_.reserve(array->count()))) {
} else { } else {
array_ = array; array_ = array;
is_inited_ = true; is_inited_ = true;
} }
@ -135,9 +135,9 @@ public:
return bool_ret; return bool_ret;
} }
int get_not_mask(ObIArray<T> &array) const int get_not_mask(ObIArray<T> &array) const
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
if (!is_inited_) { if (!is_inited_) {
ret = OB_NOT_INIT; ret = OB_NOT_INIT;
} else { } else {
array.reset(); array.reset();

View File

@ -14431,6 +14431,10 @@ int ObDDLService::check_alter_partitions(const ObTableSchema &orig_table_schema,
LOG_WARN("fail to get schema guard with version in inner table", K(ret), K(tenant_id)); LOG_WARN("fail to get schema guard with version in inner table", K(ret), K(tenant_id));
} else if (OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_tenant_id(tenant_id, is_oracle_mode))) { } else if (OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_tenant_id(tenant_id, is_oracle_mode))) {
LOG_WARN("fail to check is oracle mode", K(ret)); LOG_WARN("fail to check is oracle mode", K(ret));
} else if (orig_table_schema.is_materialized_view()) {
ret = OB_NOT_SUPPORTED;
LOG_WARN("alter partition of materialized view is not supported", KR(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED, "alter partition of materialized view is");
} else if (orig_table_schema.is_interval_part()) { } else if (orig_table_schema.is_interval_part()) {
if (PARTITION_LEVEL_TWO == orig_table_schema.get_part_level() if (PARTITION_LEVEL_TWO == orig_table_schema.get_part_level()
&& !orig_table_schema.has_sub_part_template_def()) { && !orig_table_schema.has_sub_part_template_def()) {

View File

@ -4520,6 +4520,10 @@ int ObAlterTableResolver::resolve_partition_options(const ParseNode &node)
if (OB_ISNULL(alter_table_stmt)) { if (OB_ISNULL(alter_table_stmt)) {
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
SQL_RESV_LOG(WARN, "alter table stmt should not be null", K(ret)); SQL_RESV_LOG(WARN, "alter table stmt should not be null", K(ret));
} else if (table_schema_->is_materialized_view()) {
ret = OB_NOT_SUPPORTED;
LOG_WARN("alter partition of materialized view is not supported", KR(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED, "alter partition of materialized view is");
} }
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {