fix: memory row count issue

This commit is contained in:
dapan1121 2023-03-28 19:27:49 +08:00
parent e0f951e668
commit c5f37d284e
1 changed files with 2 additions and 2 deletions

View File

@ -283,11 +283,11 @@ bool tsdbTbDataIterNext(STbDataIter *pIter) {
} }
int64_t tsdbCountTbDataRows(STbData *pTbData) { int64_t tsdbCountTbDataRows(STbData *pTbData) {
SMemSkipListNode *pNode = NULL; SMemSkipListNode *pNode = pTbData->sl.pHead;
int64_t rowsNum = 0; int64_t rowsNum = 0;
while (true) { while (true) {
pNode = SL_GET_NODE_FORWARD(pTbData->sl.pHead, 0); pNode = SL_GET_NODE_FORWARD(pNode, 0);
if (pNode == pTbData->sl.pTail) { if (pNode == pTbData->sl.pTail) {
return rowsNum; return rowsNum;
} }