fix/TD-31891-remove-void-stb-fix-case

This commit is contained in:
dmchen 2024-09-12 06:24:03 +00:00
parent 120ce576c4
commit db7b54168a
1 changed files with 5 additions and 3 deletions

View File

@ -3533,14 +3533,12 @@ static int32_t mndRetrieveStb(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBloc
pDb = mndAcquireDb(pMnode, pShow->db);
if (pDb == NULL) return terrno;
}
int64_t uid = pDb->uid;
mndReleaseDb(pMnode, pDb);
while (numOfRows < rows) {
pShow->pIter = sdbFetch(pSdb, SDB_STB, pShow->pIter, (void **)&pStb);
if (pShow->pIter == NULL) break;
if (pStb->dbUid != uid) {
if (pDb != NULL && pStb->dbUid != pDb->uid) {
sdbRelease(pSdb, pStb);
continue;
}
@ -3632,6 +3630,10 @@ static int32_t mndRetrieveStb(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBloc
sdbRelease(pSdb, pStb);
}
if (pDb != NULL) {
mndReleaseDb(pMnode, pDb);
}
goto _OVER;
_ERROR: