fix(tsdb): check return value.
This commit is contained in:
parent
1b59d4a8d7
commit
2b68e110e5
|
@ -2246,6 +2246,8 @@ static int32_t lastIterClose(SFSLastIter **iter) {
|
|||
|
||||
static int32_t lastIterNext(SFSLastIter *iter, TSDBROW **ppRow) {
|
||||
bool hasVal = false;
|
||||
*ppRow = NULL;
|
||||
|
||||
int32_t code = tMergeTreeNext(iter->pMergeTree, &hasVal);
|
||||
if (code != 0) {
|
||||
return code;
|
||||
|
|
|
@ -1108,6 +1108,7 @@ int32_t tMergeTreeNext(SMergeTree *pMTree, bool *pHasNext) {
|
|||
return TSDB_CODE_INVALID_PARA;
|
||||
}
|
||||
|
||||
*pHasNext = false;
|
||||
if (pMTree->pIter) {
|
||||
SLDataIter *pIter = pMTree->pIter;
|
||||
bool hasVal = false;
|
||||
|
|
|
@ -4105,9 +4105,10 @@ int32_t doMergeRowsInSttBlock(SSttBlockReader* pSttBlockReader, STableBlockScanI
|
|||
|
||||
while (1) {
|
||||
code = nextRowFromSttBlocks(pSttBlockReader, pScanInfo, pkSrcSlot, pVerRange);
|
||||
if (code) {
|
||||
|
||||
if (code || (!hasDataInSttBlock(pScanInfo))) {
|
||||
return code;
|
||||
}
|
||||
|
||||
SRowKey* pNextKey = getCurrentKeyInSttBlock(pSttBlockReader);
|
||||
|
||||
int32_t ret = pkCompEx(pRowKey, pNextKey);
|
||||
|
|
Loading…
Reference in New Issue