fix:[TD-31017]process return value in client
This commit is contained in:
parent
8875863d07
commit
7aaa7189d7
|
@ -376,10 +376,7 @@ int32_t processCreateSTableRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
SMCreateStbRsp createRsp = {0};
|
SMCreateStbRsp createRsp = {0};
|
||||||
SDecoder coder = {0};
|
SDecoder coder = {0};
|
||||||
tDecoderInit(&coder, pMsg->pData, pMsg->len);
|
tDecoderInit(&coder, pMsg->pData, pMsg->len);
|
||||||
code = tDecodeSMCreateStbRsp(&coder, &createRsp);
|
(void)tDecodeSMCreateStbRsp(&coder, &createRsp); // pMsg->len == 0
|
||||||
if (code != 0){
|
|
||||||
setErrno(pRequest, TAOS_GET_TERRNO(code));
|
|
||||||
}
|
|
||||||
tDecoderClear(&coder);
|
tDecoderClear(&coder);
|
||||||
|
|
||||||
pRequest->body.resInfo.execRes.msgType = TDMT_MND_CREATE_STB;
|
pRequest->body.resInfo.execRes.msgType = TDMT_MND_CREATE_STB;
|
||||||
|
@ -472,10 +469,7 @@ int32_t processAlterStbRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
SMAlterStbRsp alterRsp = {0};
|
SMAlterStbRsp alterRsp = {0};
|
||||||
SDecoder coder = {0};
|
SDecoder coder = {0};
|
||||||
tDecoderInit(&coder, pMsg->pData, pMsg->len);
|
tDecoderInit(&coder, pMsg->pData, pMsg->len);
|
||||||
code = tDecodeSMAlterStbRsp(&coder, &alterRsp);
|
(void)tDecodeSMAlterStbRsp(&coder, &alterRsp); // pMsg->len = 0
|
||||||
if (code != 0){
|
|
||||||
setErrno(pRequest, TAOS_GET_TERRNO(code));
|
|
||||||
}
|
|
||||||
tDecoderClear(&coder);
|
tDecoderClear(&coder);
|
||||||
|
|
||||||
pRequest->body.resInfo.execRes.msgType = TDMT_MND_ALTER_STB;
|
pRequest->body.resInfo.execRes.msgType = TDMT_MND_ALTER_STB;
|
||||||
|
|
|
@ -1146,13 +1146,13 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) {
|
||||||
} else if (pTrans->originRpcType == TDMT_MND_CREATE_STB) {
|
} else if (pTrans->originRpcType == TDMT_MND_CREATE_STB) {
|
||||||
void *pCont = NULL;
|
void *pCont = NULL;
|
||||||
int32_t contLen = 0;
|
int32_t contLen = 0;
|
||||||
if (0 == mndBuildSMCreateStbRsp(pMnode, pTrans->dbname, pTrans->stbname, &pCont, &contLen) != 0) {
|
if (0 == mndBuildSMCreateStbRsp(pMnode, pTrans->dbname, pTrans->stbname, &pCont, &contLen)) {
|
||||||
mndTransSetRpcRsp(pTrans, pCont, contLen);
|
mndTransSetRpcRsp(pTrans, pCont, contLen);
|
||||||
}
|
}
|
||||||
} else if (pTrans->originRpcType == TDMT_MND_CREATE_INDEX) {
|
} else if (pTrans->originRpcType == TDMT_MND_CREATE_INDEX) {
|
||||||
void *pCont = NULL;
|
void *pCont = NULL;
|
||||||
int32_t contLen = 0;
|
int32_t contLen = 0;
|
||||||
if (0 == mndBuildSMCreateStbRsp(pMnode, pTrans->dbname, pTrans->stbname, &pCont, &contLen) != 0) {
|
if (0 == mndBuildSMCreateStbRsp(pMnode, pTrans->dbname, pTrans->stbname, &pCont, &contLen)) {
|
||||||
mndTransSetRpcRsp(pTrans, pCont, contLen);
|
mndTransSetRpcRsp(pTrans, pCont, contLen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,9 @@ from util.cases import tdCases
|
||||||
from util.sql import tdSql
|
from util.sql import tdSql
|
||||||
|
|
||||||
class TDTestCase:
|
class TDTestCase:
|
||||||
|
clientCfgDict = {'debugFlag': 135}
|
||||||
|
updatecfgDict = {'debugFlag': 135, 'asynclog': 0}
|
||||||
|
updatecfgDict["clientCfg"] = clientCfgDict
|
||||||
def caseDescription(self):
|
def caseDescription(self):
|
||||||
'''
|
'''
|
||||||
ttl/comment test
|
ttl/comment test
|
||||||
|
|
Loading…
Reference in New Issue