[scn] fix failure of mittest after refresh feature scn

This commit is contained in:
obdev
2022-11-28 01:46:42 +00:00
committed by ob-robot
parent 49a02f3304
commit 54b64a7263
1898 changed files with 255804 additions and 280809 deletions

View File

@ -50,7 +50,7 @@ ObTenantRole::ObTenantRole(const ObString &str)
} else {
for (int64_t i = 0; i < ARRAYSIZEOF(TENANT_ROLE_ARRAY); i++) {
if (0 == str.case_compare(TENANT_ROLE_ARRAY[i])) {
value_ = static_cast<ObTenantRole::Role>(i);
value_ = i;
break;
}
}
@ -61,15 +61,5 @@ ObTenantRole::ObTenantRole(const ObString &str)
}
}
#define GEN_IS_TENANT_ROLE(TENANT_ROLE_VALUE, TENANT_ROLE) \
bool is_##TENANT_ROLE##_tenant(const ObTenantRole::Role value) { return TENANT_ROLE_VALUE == value; }
GEN_IS_TENANT_ROLE(ObTenantRole::Role::INVALID_TENANT, invalid)
GEN_IS_TENANT_ROLE(ObTenantRole::Role::PRIMARY_TENANT, primary)
GEN_IS_TENANT_ROLE(ObTenantRole::Role::STANDBY_TENANT, standby)
GEN_IS_TENANT_ROLE(ObTenantRole::Role::RESTORE_TENANT, restore)
#undef GEN_IS_TENANT_ROLE
} // share
} // oceanbase