[CP] issue<57371449>:fix 4013 error when pass empty array as arugment of call stmt in ps mode
This commit is contained in:
@ -3051,7 +3051,7 @@ int ObCollectionType::convert(ObPLResolveCtx &ctx, ObObj *&src, ObObj *&dst) con
|
|||||||
LOG_WARN("failed to alloc collection allocator", K(ret));
|
LOG_WARN("failed to alloc collection allocator", K(ret));
|
||||||
}
|
}
|
||||||
OX (new (collection_allocator) ObPLCollAllocator(dst_table));
|
OX (new (collection_allocator) ObPLCollAllocator(dst_table));
|
||||||
if (OB_SUCC(ret)
|
if (OB_SUCC(ret) && src_table->get_count() > 0
|
||||||
&& OB_ISNULL(table_data
|
&& OB_ISNULL(table_data
|
||||||
= static_cast<char *>(
|
= static_cast<char *>(
|
||||||
collection_allocator->alloc(element_init_size * src_table->get_count())))) {
|
collection_allocator->alloc(element_init_size * src_table->get_count())))) {
|
||||||
@ -3070,8 +3070,13 @@ int ObCollectionType::convert(ObPLResolveCtx &ctx, ObObj *&src, ObObj *&dst) con
|
|||||||
dst_table->set_type(src_table->get_type());
|
dst_table->set_type(src_table->get_type());
|
||||||
dst_table->set_allocator(collection_allocator);
|
dst_table->set_allocator(collection_allocator);
|
||||||
dst_table->set_count(src_table->get_count());
|
dst_table->set_count(src_table->get_count());
|
||||||
dst_table->set_first(1);
|
if (src_table->get_count() > 0) {
|
||||||
dst_table->set_last(src_table->get_count());
|
dst_table->set_first(1);
|
||||||
|
dst_table->set_last(src_table->get_count());
|
||||||
|
} else {
|
||||||
|
dst_table->set_first(OB_INVALID_INDEX);
|
||||||
|
dst_table->set_last(OB_INVALID_INDEX);
|
||||||
|
}
|
||||||
dst_table->set_data(reinterpret_cast<ObObj*>(table_data));
|
dst_table->set_data(reinterpret_cast<ObObj*>(table_data));
|
||||||
|
|
||||||
ObElemDesc elem_desc;
|
ObElemDesc elem_desc;
|
||||||
|
|||||||
Reference in New Issue
Block a user