[to #46711372] fix memory of element of record from resultset

This commit is contained in:
obdev
2022-12-13 11:37:57 +00:00
committed by ob-robot
parent c1de0db3a8
commit c5324e11de

View File

@ -5126,7 +5126,12 @@ int ObSPIService::inner_fetch_with_retry(ObPLExecCtx *ctx,
CK (OB_NOT_NULL(values = record->get_element())); \ CK (OB_NOT_NULL(values = record->get_element())); \
for (int64_t i = 0; OB_SUCC(ret) && i < type_count; ++i) { \ for (int64_t i = 0; OB_SUCC(ret) && i < type_count; ++i) { \
ObObj deep_copy; \ ObObj deep_copy; \
OZ (deep_copy_obj(*cast_ctx.allocator_v2_, values[i], deep_copy)); \ /*may element of record also complex value*/ \
if (values[i].is_pl_extend()) { \
OZ (pl::ObUserDefinedType::deep_copy_obj(*cast_ctx.allocator_v2_, values[i], deep_copy)); \
} else { \
OZ (deep_copy_obj(*cast_ctx.allocator_v2_, values[i], deep_copy)); \
} \
OZ (tmp_result.push_back(deep_copy)); \ OZ (tmp_result.push_back(deep_copy)); \
} \ } \
} \ } \