fix: fix use db deserialize issue
This commit is contained in:
parent
bdce9ca6b5
commit
724038b49c
|
@ -2537,10 +2537,7 @@ int32_t tDeserializeSUseDbRspImp(SDecoder *pDecoder, SUseDbRsp *pRsp) {
|
|||
if (tDecodeI16(pDecoder, &pRsp->hashSuffix) < 0) return -1;
|
||||
if (tDecodeI8(pDecoder, &pRsp->hashMethod) < 0) return -1;
|
||||
|
||||
if (pRsp->vgNum <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (pRsp->vgNum > 0) {
|
||||
pRsp->pVgroupInfos = taosArrayInit(pRsp->vgNum, sizeof(SVgroupInfo));
|
||||
if (pRsp->pVgroupInfos == NULL) {
|
||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||
|
@ -2556,6 +2553,7 @@ int32_t tDeserializeSUseDbRspImp(SDecoder *pDecoder, SUseDbRsp *pRsp) {
|
|||
if (tDecodeI32(pDecoder, &vgInfo.numOfTable) < 0) return -1;
|
||||
taosArrayPush(pRsp->pVgroupInfos, &vgInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (tDecodeI32(pDecoder, &pRsp->errCode) < 0) return -1;
|
||||
if (tDecodeI64(pDecoder, &pRsp->stateTs) < 0) return -1;
|
||||
|
|
Loading…
Reference in New Issue