fix(query):add more check.

This commit is contained in:
Haojun Liao 2023-04-30 02:42:26 +08:00
parent f645454f6c
commit 2fe494c2c7
1 changed files with 3 additions and 1 deletions

View File

@ -3497,6 +3497,7 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
} }
// all data blocks are checked in this last block file, now let's try the next file // all data blocks are checked in this last block file, now let's try the next file
// ASSERT(pReader->status.pTableIter == NULL);
if (pReader->status.pTableIter == NULL) { if (pReader->status.pTableIter == NULL) {
code = initForFirstBlockInFile(pReader, pBlockIter); code = initForFirstBlockInFile(pReader, pBlockIter);
@ -3551,7 +3552,8 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
code = initForFirstBlockInFile(pReader, pBlockIter); code = initForFirstBlockInFile(pReader, pBlockIter);
// error happens or all the data files are completely checked // error happens or all the data files are completely checked
if ((code != TSDB_CODE_SUCCESS) || (pReader->status.loadFromFile == false)) { if ((code != TSDB_CODE_SUCCESS) || (pReader->status.loadFromFile == false) ||
pReader->flag == READER_STATUS_SHOULD_STOP) {
return code; return code;
} }