[CP] Connect by with index calc is_cycle and is_leaf wrong
This commit is contained in:
@ -224,16 +224,16 @@ int ObConnectByOpBFSPump::push_back_row_to_stack(
|
||||
LOG_WARN("copy row is NULL", KPC(new_output_row), KPC(new_left_row), K(ret));
|
||||
} else if (OB_FAIL(sort_stack_.push_back(pump_node))) {
|
||||
LOG_WARN("fail to push back row", K(ret));
|
||||
} else if (pump_node.is_cycle_) {
|
||||
ret = OB_ERR_CBY_LOOP;
|
||||
LOG_WARN("there is a cycle", K(ret));
|
||||
} else {
|
||||
LOG_DEBUG("connect by pump node", K(pump_node), K(left_row), K(output_row),
|
||||
K(ObToStringExprRow(*eval_ctx_, *connect_by_prior_exprs_)));
|
||||
}
|
||||
|
||||
if (OB_FAIL(ret)) {//if fail free memory
|
||||
if (OB_FAIL(ret) && OB_ERR_CBY_LOOP != ret) {//if fail free memory
|
||||
// 由于产生环,所以上面报错,导致没有restore,从而数据错了
|
||||
if (OB_ERR_CBY_LOOP == ret && OB_SUCCESS != connect_by_->restore_prior_expr()) {
|
||||
LOG_WARN("failed to restore prior expr", K(ret));
|
||||
}
|
||||
if (pump_node.path_node_.prior_exprs_result_ != NULL) {
|
||||
allocator_.free(const_cast<ObChunkDatumStore::StoredRow *>(pump_node.path_node_.prior_exprs_result_));
|
||||
pump_node.path_node_.prior_exprs_result_ = NULL;
|
||||
|
||||
@ -437,9 +437,11 @@ int ObNLConnectByWithIndexOp::read_right_func_going()
|
||||
if (OB_FAIL(add_pseudo_column(MY_SPEC.level_expr_, LEVEL))) {
|
||||
LOG_WARN("failed to add pseudo column level", K(ret));
|
||||
} else if (OB_FAIL(connect_by_pump_.append_row(MY_SPEC.right_prior_exprs_, MY_SPEC.cur_row_exprs_))) {
|
||||
if (OB_ERR_CBY_LOOP == ret && MY_SPEC.is_nocycle_) {
|
||||
if (OB_ERR_CBY_LOOP == ret) {
|
||||
ret = OB_SUCCESS;
|
||||
if (MY_SPEC.is_nocycle_) {
|
||||
is_cycle_ = true;
|
||||
}
|
||||
} else {
|
||||
LOG_WARN("fail to append row", K(ret));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user