diff --git a/source/dnode/vnode/meta/src/metaBDBImpl.c b/source/dnode/vnode/meta/src/metaBDBImpl.c index dbb26143cc5cdd1b81540abf60cafba20705e3f1..3c1ccc72dce40e5f823a737b0ad63d8c8d74dca5 100644 --- a/source/dnode/vnode/meta/src/metaBDBImpl.c +++ b/source/dnode/vnode/meta/src/metaBDBImpl.c @@ -342,8 +342,9 @@ static int metaCtbIdxCb(DB *pIdx, const DBT *pKey, const DBT *pValue, DBT *pSKey pDbt[0].size = sizeof(pTbCfg->ctbCfg.suid); // Second key is the first tag - pDbt[1].data = NULL; - pDbt[1].size = 0; + void *pTagVal = tdGetKVRowValOfCol(pTbCfg->ctbCfg.pTag, 0); + pDbt[1].data = varDataVal(pTagVal); + pDbt[1].size = varDataLen(pTagVal); // Set index key memset(pSKey, 0, sizeof(*pSKey));