fix filter error

This commit is contained in:
yihaoDeng 2023-02-01 11:02:28 +08:00
parent 5e455b6aef
commit 3a1ce7c517
1 changed files with 6 additions and 6 deletions

View File

@ -1274,13 +1274,13 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
STagIdxKey *p = entryKey; STagIdxKey *p = entryKey;
if (p == NULL) break; if (p == NULL) break;
if (count >= 2) { if (count >= 3) {
if (p->type != pCursor->type || p->suid != pCursor->suid) { if (p->type != pCursor->type || p->suid != pCursor->suid || p->cid != pCursor->cid) {
break; break;
} }
} else { } else {
count++; count++;
if (p->type != pCursor->type) { if (p->type != pCursor->type || p->suid != pCursor->suid || p->cid != pCursor->cid) {
valid = param->reverse ? tdbTbcMoveToPrev(pCursor->pCur) : tdbTbcMoveToNext(pCursor->pCur); valid = param->reverse ? tdbTbcMoveToPrev(pCursor->pCur) : tdbTbcMoveToNext(pCursor->pCur);
if (valid < 0) { if (valid < 0) {
break; break;
@ -1300,11 +1300,11 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
} }
taosArrayPush(pUids, &tuid); taosArrayPush(pUids, &tuid);
} else if (cmp == 1) { } else if (cmp == 1) {
if (count >= 2) break; if (count >= 3) break;
// not match but should continue to iter // not match but should continue to iter
} else { } else {
// not match and no more result // not match and no more result
if (count >= 2) break; if (count >= 3) break;
} }
count++; count++;
valid = param->reverse ? tdbTbcMoveToPrev(pCursor->pCur) : tdbTbcMoveToNext(pCursor->pCur); valid = param->reverse ? tdbTbcMoveToPrev(pCursor->pCur) : tdbTbcMoveToNext(pCursor->pCur);