[CP] fix: add defensive code for table api global index

This commit is contained in:
obdev
2022-07-20 11:21:44 +08:00
committed by wangzelin.wzl
parent 3d8ce9cf22
commit 52e5b99c15
11 changed files with 176 additions and 79 deletions

View File

@ -350,7 +350,8 @@ int ObCodeGeneratorImpl::set_other_properties(const ObLogPlan& log_plan, ObPhysi
bool has_dep_table = false;
for (int64_t i = 0; OB_SUCC(ret) && !exist && i < dependency_table->count(); i++) {
if (DEPENDENCY_TABLE == dependency_table->at(i).object_type_) {
if (OB_FAIL(ObSQLUtils::has_global_index(schema_guard, dependency_table->at(i).object_id_, exist))) {
uint64_t tenant_id = extract_tenant_id(dependency_table->at(i).object_id_);
if (OB_FAIL(schema_guard->check_global_index_exist(tenant_id, dependency_table->at(i).object_id_, exist))) {
LOG_WARN("fail to judge global index", K(ret));
}
has_dep_table = true;