fix plan cache memleak for add local plan route
This commit is contained in:
@ -901,14 +901,18 @@ int ObSqlPlanSet::add_plan(ObPhysicalPlan& plan, ObPlanCacheCtx& pc_ctx, int64_t
|
|||||||
array_binding_plan_ = &plan;
|
array_binding_plan_ = &plan;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
local_plan_ = &plan;
|
if (NULL != local_plan_) {
|
||||||
local_phy_locations_.reset();
|
ret = OB_SQL_PC_PLAN_DUPLICATE;
|
||||||
if (OB_FAIL(init_phy_location(phy_locations.count()))) {
|
} else {
|
||||||
SQL_PC_LOG(WARN, "init phy location failed");
|
local_plan_ = &plan;
|
||||||
} else if (OB_FAIL(local_phy_locations_.assign(phy_locations))) {
|
local_phy_locations_.reset();
|
||||||
SQL_PC_LOG(WARN, "fail to assign phy locations");
|
if (OB_FAIL(init_phy_location(phy_locations.count()))) {
|
||||||
|
SQL_PC_LOG(WARN, "init phy location failed");
|
||||||
|
} else if (OB_FAIL(local_phy_locations_.assign(phy_locations))) {
|
||||||
|
SQL_PC_LOG(WARN, "fail to assign phy locations");
|
||||||
|
}
|
||||||
|
LOG_DEBUG("local phy locations", K(local_phy_locations_));
|
||||||
}
|
}
|
||||||
LOG_DEBUG("local phy locations", K(local_phy_locations_));
|
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case OB_PHY_PLAN_REMOTE: {
|
case OB_PHY_PLAN_REMOTE: {
|
||||||
|
|||||||
Reference in New Issue
Block a user