fix(query): reset the errno code.

This commit is contained in:
Haojun Liao 2024-08-16 22:31:21 +08:00
parent f0dda78c61
commit 5b82556ff5
2 changed files with 3 additions and 1 deletions

View File

@ -833,7 +833,8 @@ bool tLDataIterNextRow(SLDataIter *pIter, const char *idStr) {
int32_t code = 0; int32_t code = 0;
int32_t iBlockL = pIter->iSttBlk; int32_t iBlockL = pIter->iSttBlk;
SBlockData *pBlockData = NULL; SBlockData *pBlockData = NULL;
terrno = 0;
// no qualified last file block in current file, no need to fetch row // no qualified last file block in current file, no need to fetch row
if (pIter->pSttBlk == NULL) { if (pIter->pSttBlk == NULL) {
return false; return false;

View File

@ -3598,6 +3598,7 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
if (pBlockIter->numOfBlocks == 0) { if (pBlockIter->numOfBlocks == 0) {
// let's try to extract data from stt files. // let's try to extract data from stt files.
terrno = 0;
ERetrieveType type = doReadDataFromSttFiles(pReader); ERetrieveType type = doReadDataFromSttFiles(pReader);
if (type == TSDB_READ_RETURN) { if (type == TSDB_READ_RETURN) {
return terrno; return terrno;