to issue<50813268>:fix core when using set funciton to operate array type
This commit is contained in:
@ -244,9 +244,6 @@ int ObExprMultiSet::calc_ms_one_distinct(common::ObIAllocator *coll_allocator,
|
||||
}
|
||||
CK (res_cnt > 0);
|
||||
if (OB_SUCC(ret)) {
|
||||
// 计算结果大于100,且有效数据是超过50%,拷贝有效数据到新的内存,释放老内存
|
||||
// 这两个数字是拍脑袋想出来的,主要目的是希望节省内存。
|
||||
if ((res_cnt < count / 2) && (count > 100)) {
|
||||
data_arr = static_cast<ObObj *>(coll_allocator->alloc(res_cnt * sizeof(ObObj)));
|
||||
if (OB_ISNULL(data_arr)) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
@ -264,10 +261,6 @@ int ObExprMultiSet::calc_ms_one_distinct(common::ObIAllocator *coll_allocator,
|
||||
}
|
||||
}
|
||||
elem_count = res_cnt;
|
||||
} else {
|
||||
data_arr = objs;
|
||||
elem_count = res_cnt;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user