fix expr tmp result allocator sanity check core
This commit is contained in:
parent
8e5fcb688f
commit
33c8a8dd8b
@ -40,7 +40,7 @@ ObEvalCtx::ObEvalCtx(ObExecContext &exec_ctx)
|
||||
exec_ctx_(exec_ctx),
|
||||
tmp_alloc_(exec_ctx.get_eval_tmp_allocator()),
|
||||
datum_caster_(NULL),
|
||||
tmp_alloc_used_(false),
|
||||
tmp_alloc_used_(exec_ctx.get_tmp_alloc_used()),
|
||||
batch_idx_(0),
|
||||
batch_size_(0),
|
||||
expr_res_alloc_(exec_ctx.get_eval_res_allocator())
|
||||
|
@ -255,7 +255,7 @@ public:
|
||||
// Can not use allocator for expression result. (ObExpr::get_str_res_mem() is used for result).
|
||||
common::ObArenaAllocator &tmp_alloc_;
|
||||
ObDatumCaster *datum_caster_;
|
||||
bool tmp_alloc_used_;
|
||||
bool &tmp_alloc_used_;
|
||||
private:
|
||||
int64_t batch_idx_;
|
||||
int64_t batch_size_;
|
||||
|
@ -121,7 +121,8 @@ ObExecContext::ObExecContext(ObIAllocator &allocator)
|
||||
parent_ctx_(nullptr),
|
||||
nested_level_(0),
|
||||
is_ps_prepare_stage_(false),
|
||||
register_op_id_(OB_INVALID_ID)
|
||||
register_op_id_(OB_INVALID_ID),
|
||||
tmp_alloc_used_(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -294,6 +295,7 @@ void ObExecContext::destroy_eval_allocator()
|
||||
{
|
||||
eval_res_allocator_.reset();
|
||||
eval_tmp_allocator_.reset();
|
||||
tmp_alloc_used_ = false;
|
||||
}
|
||||
|
||||
int ObExecContext::get_temp_expr_eval_ctx(const ObTempExpr &temp_expr,
|
||||
|
@ -286,6 +286,7 @@ public:
|
||||
|
||||
bool has_non_trivial_expr_op_ctx() const { return has_non_trivial_expr_op_ctx_; }
|
||||
void set_non_trivial_expr_op_ctx(bool v) { has_non_trivial_expr_op_ctx_ = v; }
|
||||
inline bool &get_tmp_alloc_used() { return tmp_alloc_used_; }
|
||||
|
||||
VIRTUAL_NEED_SERIALIZE_AND_DESERIALIZE;
|
||||
protected:
|
||||
@ -613,6 +614,8 @@ protected:
|
||||
bool is_ps_prepare_stage_;
|
||||
// for sql plan monitor
|
||||
int64_t register_op_id_;
|
||||
// indicate if eval_tmp_allocator_ is used
|
||||
bool tmp_alloc_used_;
|
||||
// -------------------
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ObExecContext);
|
||||
|
Loading…
x
Reference in New Issue
Block a user