Merge pull request #27734 from taosdata/fix/TS-5390-3.0

fix: (last) mergeLastCid add check for iCol
This commit is contained in:
Hongze Cheng 2024-09-09 08:37:03 +08:00 committed by GitHub
commit f2d044fb72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -3221,6 +3221,10 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC
break;
}
// high version's column value
if (slotIds[iCol] > pTSchema->numOfCols - 1) {
continue;
}
SLastCol *lastColVal = (SLastCol *)taosArrayGet(pColArray, iCol);
if (lastColVal->colVal.cid != pTSchema->columns[slotIds[iCol]].colId) {
continue;