[CP] Fix core at ObSelectStmt::assign_set_op

This commit is contained in:
obdev 2023-09-08 12:51:05 +08:00 committed by ob-robot
parent af229ed04b
commit 811877a30a
2 changed files with 5 additions and 1 deletions

View File

@ -1069,7 +1069,9 @@ int ObSelectResolver::resolve_normal_query(const ParseNode &parse_tree)
OZ( resolve_with_clause(parse_tree.children_[PARSE_SELECT_WITH]) );
/* normal select */
select_stmt->assign_set_op(ObSelectStmt::NONE);
if (OB_SUCC(ret)) {
select_stmt->assign_set_op(ObSelectStmt::NONE);
}
OZ( resolve_query_options(parse_tree.children_[PARSE_SELECT_DISTINCT]) );
if (OB_SUCC(ret) && is_only_full_group_by_on(session_info_->get_sql_mode())) {
OZ( standard_group_checker_.init() );

View File

@ -623,6 +623,8 @@ public:
stmt = NULL;
} else if (OB_FAIL(stmt->init_stmt(table_hash_allocator_, wrapper_allocator_))) {
SQL_RESV_LOG(WARN, "failed to init tables hash", K(ret));
stmt->~StmtType();
stmt = NULL;
}
}
return ret;