diff --git a/source/client/src/clientRawBlockWrite.c b/source/client/src/clientRawBlockWrite.c index 514f99d463..6bd0d51999 100644 --- a/source/client/src/clientRawBlockWrite.c +++ b/source/client/src/clientRawBlockWrite.c @@ -372,7 +372,7 @@ _exit: } static char* processAutoCreateTable(STaosxRsp* rsp) { - if(rsp->createTableNum == 0) return strdup(""); + ASSERT(rsp->createTableNum != 0); SDecoder* decoder = taosMemoryCalloc(rsp->createTableNum, sizeof(SDecoder)); SVCreateTbReq* pCreateReq = taosMemoryCalloc(rsp->createTableNum, sizeof(SVCreateTbReq)); diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index e1c9257920..c9c02a77e1 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1658,8 +1658,14 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { rspWrapper = NULL; continue; } + // build rsp - SMqTaosxRspObj* pRsp = tmqBuildTaosxRspFromWrapper(pollRspWrapper); + void* pRsp = NULL; + if(pollRspWrapper->taosxRsp.createTableNum == 0){ + pRsp = tmqBuildRspFromWrapper(pollRspWrapper); + }else{ + pRsp = tmqBuildTaosxRspFromWrapper(pollRspWrapper); + } taosFreeQitem(pollRspWrapper); return pRsp; } else {