diff --git a/src/pl/pl_cache/ob_pl_cache_mgr.cpp b/src/pl/pl_cache/ob_pl_cache_mgr.cpp index a61a26672b..4bde114b1a 100644 --- a/src/pl/pl_cache/ob_pl_cache_mgr.cpp +++ b/src/pl/pl_cache/ob_pl_cache_mgr.cpp @@ -188,7 +188,7 @@ int ObPLCacheMgr::add_pl_cache(ObPlanCache *lib_cache, ObILibCacheObject *pl_obj int ObPLCacheMgr::cache_evict_all_pl(ObPlanCache *lib_cache) { int ret = OB_SUCCESS; - PL_CACHE_LOG(DEBUG, "cache evict all pl cache start"); + PL_CACHE_LOG(TRACE, "cache evict all pl cache start"); if (OB_ISNULL(lib_cache)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("lib cache is null"); @@ -198,7 +198,7 @@ int ObPLCacheMgr::cache_evict_all_pl(ObPlanCache *lib_cache) if (OB_FAIL(lib_cache->foreach_cache_evict(get_ids_op))) { PL_CACHE_LOG(WARN, "failed to foreach cache evict", K(ret)); } - PL_CACHE_LOG(DEBUG, "cache evict all pl end", K(to_evict_keys)); + PL_CACHE_LOG(TRACE, "cache evict all pl end"); } return ret; diff --git a/src/sql/engine/expr/ob_expr_subquery_ref.h b/src/sql/engine/expr/ob_expr_subquery_ref.h index 5fa599ed41..e06fed8b55 100644 --- a/src/sql/engine/expr/ob_expr_subquery_ref.h +++ b/src/sql/engine/expr/ob_expr_subquery_ref.h @@ -68,7 +68,7 @@ public: public: ExtraInfo(common::ObIAllocator &alloc, ObExprOperatorType type) : ObIExprExtraInfo(alloc, type), - is_cursor_(false), row_desc_(alloc) {} + is_cursor_(false), scalar_result_type_(alloc), row_desc_(alloc) {} virtual ~ExtraInfo() { row_desc_.destroy(); } void reset(); int assign(const ExtraInfo &other); diff --git a/src/sql/ob_sql.cpp b/src/sql/ob_sql.cpp index 50b11320a8..5c274a572a 100644 --- a/src/sql/ob_sql.cpp +++ b/src/sql/ob_sql.cpp @@ -1063,7 +1063,7 @@ int ObSql::do_real_prepare(const ObString &sql, && !(ObStmt::is_dml_write_stmt(stmt_type) && // returning into from oci not supported static_cast(basic_stmt)->get_returning_into_exprs().count() > 0) && enable_udr - && OB_FAIL(ObUDRUtils::match_udr_item(sql, session, allocator, item_guard))) { + && OB_FAIL(ObUDRUtils::match_udr_item(sql, session, ectx, allocator, item_guard))) { if (!ObSQLUtils::check_need_disconnect_parser_err(ret)) { ectx.set_need_disconnect(false); } @@ -1083,7 +1083,7 @@ int ObSql::do_real_prepare(const ObString &sql, param_store, session.get_local_collation_connection()))) { LOG_WARN("parameterize syntax tree failed", K(ret)); - if (OB_INVALID_ARGUMENT == ret) { + if (OB_INVALID_ARGUMENT == ret || OB_NOT_SUPPORTED == ret) { pc_ctx.ps_need_parameterized_ = false; ret = OB_SUCCESS; } diff --git a/src/sql/udr/ob_udr_utils.cpp b/src/sql/udr/ob_udr_utils.cpp index 779475574b..aa276ede17 100644 --- a/src/sql/udr/ob_udr_utils.cpp +++ b/src/sql/udr/ob_udr_utils.cpp @@ -21,6 +21,7 @@ namespace sql int ObUDRUtils::match_udr_item(const ObString &pattern, const ObSQLSessionInfo &session_info, + ObExecContext &ectx, ObIAllocator &allocator, ObUDRItemMgr::UDRItemRefGuard &guard, PatternConstConsList *cst_cons_list) @@ -50,6 +51,9 @@ int ObUDRUtils::match_udr_item(const ObString &pattern, LOG_TRACE("succ to match rewrite rule item", KPC(guard.get_ref_obj())); } } + if (OB_FAIL(ret) && !ObSQLUtils::check_need_disconnect_parser_err(ret)) { + ectx.set_need_disconnect(false); + } return ret; } @@ -251,7 +255,7 @@ int ObUDRUtils::match_udr_and_refill_ctx(const ObString &pattern, if (enable_udr && !(pc_ctx.is_inner_sql() || PC_PL_MODE == pc_ctx.mode_)) { ObIAllocator &allocator = result.get_mem_pool(); PatternConstConsList cst_cons_list; - if (OB_FAIL(match_udr_item(pattern, session, allocator, item_guard, &cst_cons_list))) { + if (OB_FAIL(match_udr_item(pattern, session, ectx, allocator, item_guard, &cst_cons_list))) { LOG_WARN("failed to match user defined rewrite rule", K(ret)); } else if (!cst_cons_list.empty() && OB_FAIL(cons_udr_const_cons_list(cst_cons_list, pc_ctx))) { @@ -268,10 +272,6 @@ int ObUDRUtils::match_udr_and_refill_ctx(const ObString &pattern, is_match_udr = true; LOG_TRACE("succ to match user-defined rule", K(ret)); } - if (OB_SUCCESS != ret - && !ObSQLUtils::check_need_disconnect_parser_err(ret)) { - ectx.set_need_disconnect(false); - } } return ret; } diff --git a/src/sql/udr/ob_udr_utils.h b/src/sql/udr/ob_udr_utils.h index f7dd3ceb79..d22036d972 100644 --- a/src/sql/udr/ob_udr_utils.h +++ b/src/sql/udr/ob_udr_utils.h @@ -29,6 +29,7 @@ public: ObUDRItemMgr::UDRItemRefGuard &item_guard); static int match_udr_item(const ObString &pattern, const ObSQLSessionInfo &session_info, + ObExecContext &ectx, ObIAllocator &allocator, ObUDRItemMgr::UDRItemRefGuard &guard, PatternConstConsList *cst_cons_list = nullptr);