Reject drop table only when drop index
This commit is contained in:
committed by
wangzelin.wzl
parent
5c2a7ab5d9
commit
618341bd5d
@ -1440,7 +1440,10 @@ int ObDDLTaskRecordOperator::check_has_conflict_ddl(
|
|||||||
} else if (task_record.task_id_ != task_id) {
|
} else if (task_record.task_id_ != task_id) {
|
||||||
switch (ddl_type) {
|
switch (ddl_type) {
|
||||||
case ObDDLType::DDL_DROP_TABLE: {
|
case ObDDLType::DDL_DROP_TABLE: {
|
||||||
|
if (task_record.ddl_type_ == ObDDLType::DDL_DROP_INDEX && task_record.target_object_id_ != task_record.object_id_) {
|
||||||
|
LOG_WARN("conflict with ddl", K(task_record));
|
||||||
has_conflict_ddl = true;
|
has_conflict_ddl = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
@ -18229,7 +18229,7 @@ int ObDDLService::drop_table(const ObDropTableArg &drop_table_arg, const obrpc::
|
|||||||
if (table_schema->get_table_type() == MATERIALIZED_VIEW || table_schema->is_tmp_table()) {
|
if (table_schema->get_table_type() == MATERIALIZED_VIEW || table_schema->is_tmp_table()) {
|
||||||
to_recyclebin = false;
|
to_recyclebin = false;
|
||||||
}
|
}
|
||||||
if (OB_FAIL(ObDDLTaskRecordOperator::check_has_conflict_ddl(
|
if (drop_table_arg.table_type_ == USER_TABLE && OB_FAIL(ObDDLTaskRecordOperator::check_has_conflict_ddl(
|
||||||
sql_proxy_,
|
sql_proxy_,
|
||||||
drop_table_arg.tenant_id_,
|
drop_table_arg.tenant_id_,
|
||||||
table_schema->get_table_id(),
|
table_schema->get_table_id(),
|
||||||
|
|||||||
Reference in New Issue
Block a user