fix error code coverage bug

This commit is contained in:
yb0
2021-10-13 11:42:56 +08:00
committed by wangzelin.wzl
parent 45460f6ae7
commit 6054dfb5fb

View File

@ -108,18 +108,24 @@ int ObExplainLogPlan::generate_raw_plan()
buf[ObLogValues::MAX_EXPLAIN_BUFFER_SIZE - 1] = '\0'; buf[ObLogValues::MAX_EXPLAIN_BUFFER_SIZE - 1] = '\0';
} }
} }
if (OB_SUCC(ret)) {
ObObj obj; ObObj obj;
obj.set_varchar(ObString::make_string(buf)); obj.set_varchar(ObString::make_string(buf));
ObNewRow row; ObNewRow row;
row.cells_ = &obj; row.cells_ = &obj;
row.count_ = 1; row.count_ = 1;
values->add_row(row); if (OB_FAIL(values->add_row(row))) {
LOG_WARN("failed to add row", K(ret));
} else {
set_phy_plan_type(OB_PHY_PLAN_LOCAL); set_phy_plan_type(OB_PHY_PLAN_LOCAL);
set_plan_root(values); set_plan_root(values);
values->mark_is_plan_root(); values->mark_is_plan_root();
// set values operator id && set max operator id for LogPlan // set values operator id && set max operator id for LogPlan
values->set_op_id(0); values->set_op_id(0);
set_max_op_id(1); set_max_op_id(1);
}
}
if (NULL != buf) { if (NULL != buf) {
get_allocator().free(buf); get_allocator().free(buf);
buf = NULL; buf = NULL;