[CP] to issue<55278351>:fix deseralize nested table core if report 4013

This commit is contained in:
hanr881
2024-03-05 06:14:38 +00:00
committed by ob-robot
parent 05a52d3d0d
commit d9ba39126b

View File

@ -2682,13 +2682,17 @@ int ObCollectionType::deserialize(ObSchemaGetterGuard &schema_guard,
K(src), K(table_data), K(table_data_len), K(table_data_pos));
}
if (OB_FAIL(ret)) {
for (int64_t j = 0; j <= n; ++j) {
ObObj* value = reinterpret_cast<ObObj*>(table_data + j);
int tmp = ObUserDefinedType::destruct_obj(*value);
if (OB_SUCCESS != tmp) {
LOG_WARN("fail torelease memory", K(ret), K(tmp));
if (OB_NOT_NULL(table_data)) {
for (int64_t j = 0; j <= n; ++j) {
ObObj* value = reinterpret_cast<ObObj*>(table_data + j);
if (OB_NOT_NULL(value)) {
int tmp = ObUserDefinedType::destruct_obj(*value);
if (OB_SUCCESS != tmp) {
LOG_WARN("fail torelease memory", K(ret), K(tmp));
}
value->set_type(ObMaxType);
}
}
value->set_type(ObMaxType);
}
collection_allocator->reset();
}