fix: add init add check it

This commit is contained in:
shenglian zhou 2023-07-27 17:23:35 +08:00 committed by slzhou
parent 6bf95c0c4d
commit d5ca51e94d
2 changed files with 2 additions and 1 deletions

View File

@ -792,6 +792,7 @@ typedef struct SLDataIter {
SVersionRange verRange; SVersionRange verRange;
SSttBlockLoadInfo *pBlockLoadInfo; SSttBlockLoadInfo *pBlockLoadInfo;
bool ignoreEarlierTs; bool ignoreEarlierTs;
bool bInit;
struct SSttFileReader *pReader; struct SSttFileReader *pReader;
} SLDataIter; } SLDataIter;

View File

@ -820,7 +820,7 @@ int32_t tMergeTreeOpen2(SMergeTree *pMTree, SMergeTreeConf *pConf) {
if (code != TSDB_CODE_SUCCESS) { if (code != TSDB_CODE_SUCCESS) {
goto _end; goto _end;
} }
pIter->bInit = true;
bool hasVal = tLDataIterNextRow(pIter, pMTree->idStr); bool hasVal = tLDataIterNextRow(pIter, pMTree->idStr);
if (hasVal) { if (hasVal) {
tMergeTreeAddIter(pMTree, pIter); tMergeTreeAddIter(pMTree, pIter);