fix generating nonstreaming plan for skip locked for update

This commit is contained in:
obdev
2024-02-09 07:31:51 +00:00
committed by ob-robot
parent d79c4f9031
commit 11b4ffa316
3 changed files with 11 additions and 8 deletions

View File

@ -4545,8 +4545,11 @@ int ObSelectLogPlan::allocate_plan_top()
// allocate root exchange
if (OB_SUCC(ret) && is_final_root_plan()) {
// allocate material if there is for update.
if (optimizer_context_.has_for_update() && OB_FAIL(candi_allocate_for_update_material())) {
// allocate material if there is for update without skip locked.
// FOR UPDATE SKIP LOCKED does not need SQL-level retry, hence we don't need a MATERIAL to
// block the output.
if (optimizer_context_.has_no_skip_for_update()
&& OB_FAIL(candi_allocate_for_update_material())) {
LOG_WARN("failed to allocate material", K(ret));
//allocate temp-table transformation if needed.
} else if (!get_optimizer_context().get_temp_table_infos().empty() &&