Merge pull request #27439 from taosdata/fix/TD-31515/arrayPush

fix: check arraypush result
This commit is contained in:
dapan1121 2024-08-26 09:11:13 +08:00 committed by GitHub
commit 319cd62049
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -11072,7 +11072,10 @@ static int32_t createStreamReqVersionInfo(SSDataBlock* pBlock, SArray** pArray,
for (int32_t i = 0; i < pBlock->info.rows; ++i) { for (int32_t i = 0; i < pBlock->info.rows; ++i) {
SVgroupVer v = {.vgId = *(int32_t*)colDataGetData(pCol1, i), .ver = *(int64_t*)colDataGetData(pCol2, i)}; SVgroupVer v = {.vgId = *(int32_t*)colDataGetData(pCol1, i), .ver = *(int64_t*)colDataGetData(pCol2, i)};
(void)taosArrayPush(*pArray, &v); if((taosArrayPush(*pArray, &v)) == NULL) {
taosArrayDestroy(*pArray);
return terrno;
}
} }
} else { } else {
int32_t precision = (pInterval->interval > 0) ? pInterval->precision : TSDB_TIME_PRECISION_MILLI; int32_t precision = (pInterval->interval > 0) ? pInterval->precision : TSDB_TIME_PRECISION_MILLI;