diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index ea2f3f91be..d924e97ae3 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -366,7 +366,7 @@ int32_t extractMsgFromWal(SWalReader* pReader, void** pItem, int64_t maxVer, con } else if (pCont->msgType == TDMT_VND_DELETE) { void* pBody = POINTER_SHIFT(pCont->body, sizeof(SMsgHead)); int32_t len = pCont->bodyLen - sizeof(SMsgHead); - EStreamType blockType = pCont->msgType == STREAM_DELETE_DATA; + EStreamType blockType = STREAM_DELETE_DATA; code = tqExtractDelDataBlock(pBody, len, ver, (void**)pItem, 0, blockType); if (code == TSDB_CODE_SUCCESS) { if (*pItem == NULL) { diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 723ebb333d..64bfa5a04d 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -561,7 +561,7 @@ int32_t vnodePreProcessDropTbMsg(SVnode* pVnode, SRpcMsg* pMsg) { SVDropTbBatchReq receivedBatchReqs = {0}; SVDropTbBatchReq sentBatchReqs = {0}; - tDecoderInit(&dc, pMsg->pCont + sizeof(SMsgHead), pMsg->contLen - sizeof(SMsgHead)); + tDecoderInit(&dc, POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)), pMsg->contLen - sizeof(SMsgHead)); code = tDecodeSVDropTbBatchReq(&dc, &receivedBatchReqs); if (code < 0) { @@ -591,7 +591,7 @@ int32_t vnodePreProcessDropTbMsg(SVnode* pVnode, SRpcMsg* pMsg) { sentBatchReqs.nReqs = sentBatchReqs.pArray->size; tEncodeSize(tEncodeSVDropTbBatchReq, &sentBatchReqs, size, code); - tEncoderInit(&ec, pMsg->pCont + sizeof(SMsgHead), size); + tEncoderInit(&ec, POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)), size); code = tEncodeSVDropTbBatchReq(&ec, &sentBatchReqs); tEncoderClear(&ec); if (code != TSDB_CODE_SUCCESS) {