[CP] fix handle_physical_plan core caused by uninitialized ParseResult

This commit is contained in:
chimyue 2024-10-12 03:43:37 +00:00 committed by ob-robot
parent 07e183f312
commit 377f8830ae

View File

@ -1220,6 +1220,7 @@ int ObSql::do_real_prepare(const ObString &sql,
int ret = OB_SUCCESS;
bool enable_udr = false;
ParseResult parse_result;
MEMSET(&parse_result, 0, SIZEOF(ParseResult));
ObStmt *basic_stmt = NULL;
stmt::StmtType stmt_type = stmt::T_NONE;
int64_t param_cnt = 0;
@ -1481,6 +1482,7 @@ int ObSql::handle_pl_prepare(const ObString &sql,
int64_t param_cnt = 0;
ObString normalized_sql;
ParseResult parse_result;
MEMSET(&parse_result, 0, SIZEOF(ParseResult));
ObStmt *basic_stmt = NULL;
int64_t cur_timeout_us = 0;
stmt::StmtType stmt_type = stmt::T_NONE;
@ -5019,6 +5021,7 @@ int ObSql::pc_add_udr_plan(const ObUDRItemMgr::UDRItemRefGuard &item_guard,
int get_plan_err = OB_SUCCESS;
bool add_plan_to_pc = false;
ParseResult parse_result;
MEMSET(&parse_result, 0, SIZEOF(ParseResult));
ObIAllocator &allocator = result.get_mem_pool();
ObSQLSessionInfo &session = result.get_session();
ObPlanCache *plan_cache = session.get_plan_cache();
@ -5076,7 +5079,9 @@ OB_NOINLINE int ObSql::handle_physical_plan(const ObString &trimed_stmt,
ObString signature_format_sql;
ObOutlineState outline_state;
ParseResult parse_result;
MEMSET(&parse_result, 0, SIZEOF(ParseResult));
ParseResult outline_parse_result;
MEMSET(&outline_parse_result, 0, SIZEOF(ParseResult));
bool add_plan_to_pc = false;
bool is_match_udr = false;
ObUDRItemMgr::UDRItemRefGuard item_guard;