Skip to content

Commit

Permalink
Merge pull request #22331 from taosdata/fix/TD-25515
Browse files Browse the repository at this point in the history
fix: ins_indexes vgroup_id using null value instead of -1 for invalid
  • Loading branch information
dapan1121 committed Aug 7, 2023
2 parents 443c6ef + 84bf3e5 commit 11f6f20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions source/dnode/mnode/impl/src/mndIndex.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ int32_t mndRetrieveTagIdx(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, i
if (pDb == NULL) return 0;
}
SSmaAndTagIter *pIter = pShow->pIter;
int invalid = -1;
while (numOfRows < rows) {
pIter->pIdxIter = sdbFetch(pSdb, SDB_IDX, pIter->pIdxIter, (void **)&pIdx);
if (pIter->pIdxIter == NULL) break;
Expand Down Expand Up @@ -552,7 +551,7 @@ int32_t mndRetrieveTagIdx(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, i

pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);

colDataSetVal(pColInfo, numOfRows, (const char *)&invalid, false);
colDataSetVal(pColInfo, numOfRows, NULL, true);

pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
colDataSetVal(pColInfo, numOfRows, (const char *)&pIdx->createdTime, false);
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/0-others/show_tag_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def check_indexes(self):
tdSql.checkData(0, 0, 'idx1')
tdSql.checkData(0, 1, 'db')
tdSql.checkData(0, 2, 'stb')
tdSql.checkData(0, 3, -1)
tdSql.checkData(0, 3, None)
tdSql.checkData(0, 5, 't1')
tdSql.checkData(0, 6, 'tag_index')

Expand Down

0 comments on commit 11f6f20

Please sign in to comment.