fix: reset show obj iter on no more data to read in mndRetrieveIdx
This commit is contained in:
parent
a6455672c0
commit
dbeafb508b
|
@ -1324,7 +1324,14 @@ static int32_t mndRetrieveIdx(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBloc
|
|||
pShow->pIter = taosMemoryCalloc(1, sizeof(SSmaAndTagIter));
|
||||
}
|
||||
int32_t read = mndRetrieveSma(pReq, pShow, pBlock, rows);
|
||||
if (read < rows) read += mndRetrieveTagIdx(pReq, pShow, pBlock, rows - read);
|
||||
if (read < rows) {
|
||||
read += mndRetrieveTagIdx(pReq, pShow, pBlock, rows - read);
|
||||
}
|
||||
// no more to read
|
||||
if (read < rows) {
|
||||
taosMemoryFree(pShow->pIter);
|
||||
pShow->pIter = NULL;
|
||||
}
|
||||
return read;
|
||||
}
|
||||
static void mndCancelRetrieveIdx(SMnode *pMnode, void *pIter) {
|
||||
|
|
Loading…
Reference in New Issue