diff --git a/src/sql/engine/ob_physical_plan_ctx.cpp b/src/sql/engine/ob_physical_plan_ctx.cpp index 6242f2dbb..3ee62a521 100644 --- a/src/sql/engine/ob_physical_plan_ctx.cpp +++ b/src/sql/engine/ob_physical_plan_ctx.cpp @@ -111,12 +111,14 @@ ObPhysicalPlanCtx::ObPhysicalPlanCtx(common::ObIAllocator &allocator) is_ps_protocol_(false), plan_start_time_(0), is_ps_rewrite_sql_(false), - spm_ts_timeout_us_(0) + spm_ts_timeout_us_(0), + subschema_ctx_(allocator_) { } ObPhysicalPlanCtx::~ObPhysicalPlanCtx() { + subschema_ctx_.destroy(); } void ObPhysicalPlanCtx::restore_param_store(const int64_t original_param_cnt) diff --git a/src/sql/engine/ob_physical_plan_ctx.h b/src/sql/engine/ob_physical_plan_ctx.h index 31bf985ee..94f5ecc67 100644 --- a/src/sql/engine/ob_physical_plan_ctx.h +++ b/src/sql/engine/ob_physical_plan_ctx.h @@ -23,6 +23,7 @@ #include "sql/plan_cache/ob_plan_cache_util.h" #include "sql/engine/user_defined_function/ob_udf_ctx_mgr.h" #include "sql/engine/expr/ob_expr.h" +#include "sql/engine/ob_subschema_ctx.h" namespace oceanbase { namespace sql @@ -594,6 +595,7 @@ private: bool is_ps_rewrite_sql_; // timeout use by spm, don't need to serialize int64_t spm_ts_timeout_us_; + ObSubSchemaCtx subschema_ctx_; }; }