Fix expr calc using system tenant memory
This commit is contained in:
@ -65,8 +65,7 @@ void ObOpKitStore::destroy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ObExecContext::ObExecContext(ObIAllocator &allocator)
|
ObExecContext::ObExecContext(ObIAllocator &allocator)
|
||||||
: sche_allocator_("ExecCtx", OB_MALLOC_NORMAL_BLOCK_SIZE),
|
: allocator_(allocator),
|
||||||
allocator_(allocator),
|
|
||||||
phy_op_size_(0),
|
phy_op_size_(0),
|
||||||
phy_op_ctx_store_(NULL),
|
phy_op_ctx_store_(NULL),
|
||||||
phy_op_input_store_(NULL),
|
phy_op_input_store_(NULL),
|
||||||
|
|||||||
@ -448,6 +448,12 @@ public:
|
|||||||
int64_t get_register_op_id() { return register_op_id_; }
|
int64_t get_register_op_id() { return register_op_id_; }
|
||||||
void set_register_op_id(int64_t id) { register_op_id_ = id; }
|
void set_register_op_id(int64_t id) { register_op_id_ = id; }
|
||||||
bool is_rt_monitor_node_registered() { return OB_INVALID_ID != register_op_id_; }
|
bool is_rt_monitor_node_registered() { return OB_INVALID_ID != register_op_id_; }
|
||||||
|
void set_mem_attr(const common::ObMemAttr& attr)
|
||||||
|
{
|
||||||
|
sche_allocator_.set_attr(attr);
|
||||||
|
eval_res_allocator_.set_attr(attr);
|
||||||
|
eval_tmp_allocator_.set_attr(attr);
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
int build_temp_expr_ctx(const ObTempExpr &temp_expr, ObTempExprCtx *&temp_expr_ctx);
|
int build_temp_expr_ctx(const ObTempExpr &temp_expr, ObTempExprCtx *&temp_expr_ctx);
|
||||||
int set_phy_op_ctx_ptr(uint64_t index, void *phy_op);
|
int set_phy_op_ctx_ptr(uint64_t index, void *phy_op);
|
||||||
|
|||||||
@ -2847,7 +2847,12 @@ OB_INLINE int ObSql::init_exec_context(const ObSqlCtx &context, ObExecContext &e
|
|||||||
if (OB_FAIL(exec_ctx.create_physical_plan_ctx())) {
|
if (OB_FAIL(exec_ctx.create_physical_plan_ctx())) {
|
||||||
LOG_WARN("faile to create physical plan ctx", K(ret));
|
LOG_WARN("faile to create physical plan ctx", K(ret));
|
||||||
} else {
|
} else {
|
||||||
|
ObMemAttr mem_attr;
|
||||||
|
mem_attr.label_ = ObModIds::OB_SQL_EXEC_CONTEXT;
|
||||||
|
mem_attr.tenant_id_ = context.session_info_->get_effective_tenant_id();
|
||||||
|
mem_attr.ctx_id_ = ObCtxIds::EXECUTE_CTX_ID;
|
||||||
exec_ctx.set_my_session(context.session_info_);
|
exec_ctx.set_my_session(context.session_info_);
|
||||||
|
exec_ctx.set_mem_attr(mem_attr);
|
||||||
exec_ctx.set_sql_ctx(const_cast<ObSqlCtx*>(&context));
|
exec_ctx.set_sql_ctx(const_cast<ObSqlCtx*>(&context));
|
||||||
if (OB_NOT_NULL(exec_ctx.get_physical_plan_ctx()) && OB_NOT_NULL(context.session_info_)) {
|
if (OB_NOT_NULL(exec_ctx.get_physical_plan_ctx()) && OB_NOT_NULL(context.session_info_)) {
|
||||||
int64_t query_timeout = 0;
|
int64_t query_timeout = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user