to issue<47171684>:fix sanity core:ob will core when bulk collect into complex type var which has owned some data

This commit is contained in:
obdev
2023-01-28 15:46:44 +08:00
committed by ob-robot
parent af2506b14c
commit e0bd258289

View File

@ -6053,7 +6053,7 @@ int ObSPIService::store_result(ObIArray<ObPLCollection*> &bulk_tables,
//初始化所有的ObObj
OX (append_mode && old_count > 0 ? MEMCPY(bulk_addr, old_data, old_count * sizeof(ObObj)) : (void*)(NULL));
for (int64_t j = 0; OB_SUCC(ret) && j < row_count; ++j) {
OX (new (&reinterpret_cast<ObObj*>(table->get_data())[old_count + j])ObObj(ObNullType));
OX (new (&reinterpret_cast<ObObj*>(table->get_data())[append_mode ? old_count + j : j])ObObj(ObNullType));
}
if (OB_SUCC(ret)) {