Revert fix drop other table's unique constraint
This commit is contained in:
parent
5552c859a8
commit
bea57cf344
@ -8389,7 +8389,6 @@ int ObDDLService::get_index_schema_by_name(
|
||||
ObArenaAllocator allocator(ObModIds::OB_SCHEMA);
|
||||
const ObString &index_name = drop_index_arg.index_name_;
|
||||
const bool is_mlog = (obrpc::ObIndexArg::DROP_MLOG == drop_index_arg.index_action_type_);
|
||||
index_table_schema = nullptr;
|
||||
|
||||
//build index name and get index schema
|
||||
if (is_mlog) {
|
||||
@ -8413,12 +8412,6 @@ int ObDDLService::get_index_schema_by_name(
|
||||
LOG_USER_ERROR(OB_ERR_CANT_DROP_FIELD_OR_KEY, index_name.length(), index_name.ptr());
|
||||
LOG_WARN("get index table schema failed", K(tenant_id),
|
||||
K(database_id), K(index_table_name), K(ret));
|
||||
} else if (is_index && data_table_id != index_table_schema->get_data_table_id()) {
|
||||
ret = OB_ERR_CANT_DROP_FIELD_OR_KEY;
|
||||
LOG_USER_ERROR(OB_ERR_CANT_DROP_FIELD_OR_KEY, index_name.length(), index_name.ptr());
|
||||
LOG_WARN("get index table schema failed", K(tenant_id),
|
||||
K(database_id), K(index_table_name), K(index_table_schema->get_table_id()), K(ret));
|
||||
index_table_schema = nullptr;
|
||||
} else if (index_table_schema->is_in_recyclebin()) {
|
||||
ret = OB_ERR_OPERATION_ON_RECYCLE_OBJECT;
|
||||
LOG_WARN("index table is in recyclebin", K(ret));
|
||||
|
@ -92,9 +92,9 @@ int ObDDLLock::lock_for_add_drop_index(
|
||||
const int64_t timeout_us = DEFAULT_TIMEOUT;
|
||||
ObSEArray<ObTabletID, 1> data_tablet_ids;
|
||||
ObInnerSQLConnection *iconn = nullptr;
|
||||
if (OB_UNLIKELY(data_table_schema.is_user_hidden_table() || data_table_id != index_schema.get_data_table_id())) {
|
||||
if (data_table_schema.is_user_hidden_table()) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("lock for rebuild hidden table index", K(ret), K(tenant_id), K(data_table_id), K(index_table_id), K(index_schema.get_data_table_id()));
|
||||
LOG_WARN("lock for rebuild hidden table index", K(ret));
|
||||
} else if (!need_lock(data_table_schema)) {
|
||||
LOG_INFO("skip ddl lock", K(data_table_id));
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user