Fix error in the preparation phase of snapshot creation and other bugfix

This commit is contained in:
lalalafeier
2023-12-25 12:48:23 +00:00
committed by ob-robot
parent e3629e30a2
commit 544a6d3ddb
7 changed files with 29 additions and 9 deletions

View File

@ -182,12 +182,15 @@ int ObCloneTenantResolver::resolve_option_list_(const ParseNode *node,
} else {
for (int64_t i = 0; OB_SUCC(ret) && i < node->num_child_; i++) {
const ParseNode *option_node = node->children_[i];
if (OB_UNLIKELY(NULL == option_node)) {
if (OB_ISNULL(option_node)) {
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("invalid node", KR(ret));
} else if (OB_UNLIKELY(1 != option_node->num_child_)) {
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("invalid node", KR(ret));
} else if (OB_ISNULL(option_node->children_[0])) {
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("invalid node", KR(ret));
} else if (T_RESOURCE_POOL_LIST == option_node->type_) {
resource_pool_name.assign_ptr((char *)(option_node->children_[0]->str_value_),
static_cast<int32_t>(option_node->children_[0]->str_len_));