fix:[TD-31017]process return value in client

This commit is contained in:
wangmm0220 2024-07-27 15:29:25 +08:00
parent 8875863d07
commit 7aaa7189d7
3 changed files with 7 additions and 10 deletions

View File

@ -376,10 +376,7 @@ int32_t processCreateSTableRsp(void* param, SDataBuf* pMsg, int32_t code) {
SMCreateStbRsp createRsp = {0};
SDecoder coder = {0};
tDecoderInit(&coder, pMsg->pData, pMsg->len);
code = tDecodeSMCreateStbRsp(&coder, &createRsp);
if (code != 0){
setErrno(pRequest, TAOS_GET_TERRNO(code));
}
(void)tDecodeSMCreateStbRsp(&coder, &createRsp); // pMsg->len == 0
tDecoderClear(&coder);
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};
SDecoder coder = {0};
tDecoderInit(&coder, pMsg->pData, pMsg->len);
code = tDecodeSMAlterStbRsp(&coder, &alterRsp);
if (code != 0){
setErrno(pRequest, TAOS_GET_TERRNO(code));
}
(void)tDecodeSMAlterStbRsp(&coder, &alterRsp); // pMsg->len = 0
tDecoderClear(&coder);
pRequest->body.resInfo.execRes.msgType = TDMT_MND_ALTER_STB;

View File

@ -1146,13 +1146,13 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) {
} else if (pTrans->originRpcType == TDMT_MND_CREATE_STB) {
void *pCont = NULL;
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);
}
} else if (pTrans->originRpcType == TDMT_MND_CREATE_INDEX) {
void *pCont = NULL;
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);
}
}

View File

@ -18,6 +18,9 @@ from util.cases import tdCases
from util.sql import tdSql
class TDTestCase:
clientCfgDict = {'debugFlag': 135}
updatecfgDict = {'debugFlag': 135, 'asynclog': 0}
updatecfgDict["clientCfg"] = clientCfgDict
def caseDescription(self):
'''
ttl/comment test