From ed0ed1a0a8b49c5b1bd808ee8e6efc9256fa551d Mon Sep 17 00:00:00 2001 From: lf0 Date: Thu, 21 Oct 2021 16:24:43 +0800 Subject: [PATCH] Fix the core caused by using invalid memory --- src/sql/plan_cache/ob_sql_parameterization.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/plan_cache/ob_sql_parameterization.cpp b/src/sql/plan_cache/ob_sql_parameterization.cpp index 41efffa1e9..b459a14178 100644 --- a/src/sql/plan_cache/ob_sql_parameterization.cpp +++ b/src/sql/plan_cache/ob_sql_parameterization.cpp @@ -1265,14 +1265,14 @@ int ObSqlParameterization::get_select_item_param_info( SQL_PC_LOG( WARN, "invalid null children", K(ret), K(stack_frames.at(frame_idx).cur_node_->children_), K(frame_idx)); } else { - TraverseStackFrame& frame = stack_frames.at(frame_idx); + TraverseStackFrame frame = stack_frames.at(frame_idx); for (int64_t i = frame.next_child_idx_; OB_SUCC(ret) && i < frame.cur_node_->num_child_; i++) { if (OB_ISNULL(frame.cur_node_->children_[i])) { - frame.next_child_idx_ = i + 1; + stack_frames.at(frame_idx).next_child_idx_ = i + 1; } else if (OB_FAIL(stack_frames.push_back(TraverseStackFrame{frame.cur_node_->children_[i], 0}))) { LOG_WARN("failed to push back eleemnt", K(ret)); } else { - frame.next_child_idx_ = i + 1; + stack_frames.at(frame_idx).next_child_idx_ = i + 1; LOG_DEBUG("after pushing frame", K(stack_frames)); break; } -- GitLab