fix memleak when intersect two in keyparts
This commit is contained in:
@ -718,7 +718,6 @@ int ObKeyPart::deep_node_copy(const ObKeyPart &other)
|
||||
int InParamMeta::assign(const InParamMeta &other, ObIAllocator &alloc)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
vals_.set_block_allocator(ModulePageAllocator(alloc));
|
||||
if (OB_UNLIKELY(other.vals_.empty())) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("get invalid in keypart", K(ret));
|
||||
@ -745,6 +744,7 @@ InParamMeta* ObInKeyPart::create_param_meta(ObIAllocator &alloc)
|
||||
InParamMeta *new_param = NULL;
|
||||
if (OB_NOT_NULL(ptr = alloc.alloc(sizeof(InParamMeta)))) {
|
||||
new_param = new(ptr) InParamMeta();
|
||||
new_param->vals_.set_block_allocator(ModulePageAllocator(alloc));
|
||||
}
|
||||
return new_param;
|
||||
}
|
||||
@ -1031,7 +1031,6 @@ OB_DEF_DESERIALIZE(ObKeyPart)
|
||||
LOG_WARN("callocate memory failed", K(ret));
|
||||
} else {
|
||||
param_meta->pos_ = key_pos;
|
||||
param_meta->vals_.set_block_allocator(ModulePageAllocator(allocator_));
|
||||
for (int64_t j = 0; OB_SUCC(ret) && j < val_cnt; ++j) {
|
||||
ObObj val;
|
||||
OB_UNIS_DECODE(val);
|
||||
|
||||
@ -2956,7 +2956,6 @@ int ObQueryRange::prepare_multi_in_info(const ObOpRawExpr *l_expr,
|
||||
LOG_WARN("failed to push back param", K(ret));
|
||||
} else {
|
||||
new_param_meta->pos_ = *key_pos;
|
||||
new_param_meta->vals_.set_block_allocator(ModulePageAllocator(allocator_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3103,7 +3102,6 @@ int ObQueryRange::get_single_in_key_part(const ObColumnRefRawExpr *col_expr,
|
||||
tmp_key_part->in_keypart_->table_id_ = col_expr->get_table_id();
|
||||
tmp_key_part->in_keypart_->is_strict_in_ = true;
|
||||
new_param_meta->pos_ = *key_pos;
|
||||
new_param_meta->vals_.set_block_allocator(ModulePageAllocator(allocator_));
|
||||
ObSEArray<int64_t, 4> invalid_val_idx;
|
||||
bool always_true = false;
|
||||
for (int64_t i = 0; OB_SUCC(ret) && !always_true && i < r_expr->get_param_count(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user