[CP] Fix the problem of still performing hard parsing when the SQL current limit reaches 0

This commit is contained in:
obdev
2024-02-07 13:03:27 +00:00
committed by ob-robot
parent d8b4a05f63
commit e633b2ae82
4 changed files with 23 additions and 5 deletions

View File

@ -4329,6 +4329,9 @@ int ObSql::pc_add_plan(ObPlanCacheCtx &pc_ctx,
ret = plan_cache->add_plan(phy_plan, pc_ctx);
}
plan_added = (OB_SUCCESS == ret);
if (pc_ctx.is_max_curr_limit_) {
ret = OB_REACH_MAX_CONCURRENT_NUM;
}
if (is_batch_exec) {
// Batch optimization cannot continue for errors other than OB_SQL_PC_PLAN_DUPLICATE.