fix(query): set start row index for desc scan.

This commit is contained in:
Haojun Liao 2022-12-23 00:56:03 +08:00
parent c2f6d4ab77
commit 884f9dfee1
1 changed files with 4 additions and 1 deletions

View File

@ -501,7 +501,10 @@ bool tLDataIterNextRow(SLDataIter *pIter, const char *idStr) {
if (iBlockL != pIter->iSttBlk) {
pBlockData = loadLastBlock(pIter, idStr);
pIter->iRow += step;
if (pBlockData == NULL) {
goto _exit;
}
pIter->iRow = pIter->backward? pBlockData->nRow-1:0;
}
}