fix drop table problem
This commit is contained in:
parent
d3bd0dedcf
commit
ce5e6cdbcb
|
@ -392,7 +392,7 @@ static int vnodeProcessCreateTbReq(SVnode *pVnode, int64_t version, void *pReq,
|
||||||
tEncoderClear(&encoder);
|
tEncoderClear(&encoder);
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
taosArrayClear(rsp.pArray);
|
taosArrayDestroy(rsp.pArray);
|
||||||
tDecoderClear(&decoder);
|
tDecoderClear(&decoder);
|
||||||
tEncoderClear(&encoder);
|
tEncoderClear(&encoder);
|
||||||
return rcode;
|
return rcode;
|
||||||
|
@ -454,6 +454,7 @@ static int vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq, in
|
||||||
SVDropTbBatchReq req = {0};
|
SVDropTbBatchReq req = {0};
|
||||||
SVDropTbBatchRsp rsp = {0};
|
SVDropTbBatchRsp rsp = {0};
|
||||||
SDecoder decoder = {0};
|
SDecoder decoder = {0};
|
||||||
|
SEncoder encoder = {0};
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
pRsp->msgType = TDMT_VND_DROP_TABLE_RSP;
|
pRsp->msgType = TDMT_VND_DROP_TABLE_RSP;
|
||||||
|
@ -471,7 +472,7 @@ static int vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq, in
|
||||||
}
|
}
|
||||||
|
|
||||||
// process req
|
// process req
|
||||||
rsp.pArray = taosArrayInit(sizeof(SVDropTbRsp), req.nReqs);
|
rsp.pArray = taosArrayInit(req.nReqs, sizeof(SVDropTbRsp));
|
||||||
for (int iReq = 0; iReq < req.nReqs; iReq++) {
|
for (int iReq = 0; iReq < req.nReqs; iReq++) {
|
||||||
SVDropTbReq *pDropTbReq = req.pReqs + iReq;
|
SVDropTbReq *pDropTbReq = req.pReqs + iReq;
|
||||||
SVDropTbRsp dropTbRsp = {0};
|
SVDropTbRsp dropTbRsp = {0};
|
||||||
|
@ -493,7 +494,11 @@ static int vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq, in
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
tDecoderClear(&decoder);
|
tDecoderClear(&decoder);
|
||||||
// encode rsp (TODO)
|
tEncodeSize(tEncodeSVDropTbBatchRsp, &rsp, pRsp->contLen, ret);
|
||||||
|
pRsp->pCont = rpcMallocCont(pRsp->contLen);
|
||||||
|
tEncoderInit(&encoder, pRsp->pCont, pRsp->contLen);
|
||||||
|
tEncodeSVDropTbBatchRsp(&encoder, &rsp);
|
||||||
|
tEncoderClear(&encoder);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -596,7 +601,6 @@ static int vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq, in
|
||||||
}
|
}
|
||||||
|
|
||||||
rsp.affectedRows += nRows;
|
rsp.affectedRows += nRows;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
|
|
|
@ -1528,6 +1528,7 @@ int tdbBtcUpsert(SBTC *pBtc, const void *pKey, int kLen, const void *pData, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tdbOsFree(pBuf);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue