fix: fix address sanitizer error

This commit is contained in:
slzhou 2023-11-01 13:25:54 +08:00
parent 4806480b2a
commit bd64b9102d
1 changed files with 2 additions and 1 deletions

View File

@ -238,7 +238,8 @@ static int32_t parseBoundColumns(SInsertParseContext* pCxt, const char** pSql, E
continue;
}
int16_t t = lastColIdx + 1;
int16_t index = insFindCol(&token, t, pBoundInfo->numOfCols, pSchema);
int16_t end = (boundColsType == BOUND_ALL_AND_TBNAME) ? (pBoundInfo->numOfCols - 1) : pBoundInfo->numOfCols;
int16_t index = insFindCol(&token, t, end, pSchema);
if (index < 0 && t > 0) {
index = insFindCol(&token, 0, t, pSchema);
}