diff --git a/source/client/src/clientRawBlockWrite.c b/source/client/src/clientRawBlockWrite.c index bc76cb5da9..18b4b924e6 100644 --- a/source/client/src/clientRawBlockWrite.c +++ b/source/client/src/clientRawBlockWrite.c @@ -197,7 +197,7 @@ static int32_t setCompressOption(cJSON* json, uint32_t para) { cJSON* levelJson = cJSON_CreateString(levelStr); RAW_NULL_CHECK(levelJson); RAW_FALSE_CHECK(cJSON_AddItemToObject(json, "level", levelJson)); - return code + return code; } end: @@ -571,7 +571,8 @@ static void processAutoCreateTable(STaosxRsp* rsp, char** string) { goto end; } } - cJSON* pJson = buildCreateCTableJson(pCreateReq, rsp->createTableNum); + cJSON* pJson = NULL; + buildCreateCTableJson(pCreateReq, rsp->createTableNum, &pJson); *string = cJSON_PrintUnformatted(pJson); cJSON_Delete(pJson); @@ -588,7 +589,7 @@ end: taosMemoryFree(pCreateReq); } -static cJSON* processAlterTable(SMqMetaRsp* metaRsp) { +static void processAlterTable(SMqMetaRsp* metaRsp, cJSON** pJson) { SDecoder decoder = {0}; SVAlterTbReq vAlterTbReq = {0}; char* string = NULL; @@ -756,7 +757,7 @@ static cJSON* processAlterTable(SMqMetaRsp* metaRsp) { end: uDebug("alter table return, sql json:%s", cJSON_PrintUnformatted(json)); tDecoderClear(&decoder); - return json; + *pJson = json; } static void processDropSTable(SMqMetaRsp* metaRsp, cJSON** pJson) { diff --git a/source/client/test/CMakeLists.txt b/source/client/test/CMakeLists.txt index 7c3847e4a1..3d70c67661 100644 --- a/source/client/test/CMakeLists.txt +++ b/source/client/test/CMakeLists.txt @@ -23,11 +23,11 @@ TARGET_LINK_LIBRARIES( PUBLIC os util common transport parser catalog scheduler function gtest taos_static qcom geometry ) -ADD_EXECUTABLE(clientMonitorTest clientMonitorTests.cpp) -TARGET_LINK_LIBRARIES( - clientMonitorTest - PUBLIC os util common transport monitor parser catalog scheduler function gtest taos_static qcom executor -) +#ADD_EXECUTABLE(clientMonitorTest clientMonitorTests.cpp) +#TARGET_LINK_LIBRARIES( +# clientMonitorTest +# PUBLIC os util common transport monitor parser catalog scheduler function gtest taos_static qcom executor +#) TARGET_INCLUDE_DIRECTORIES( clientTest @@ -47,11 +47,11 @@ TARGET_INCLUDE_DIRECTORIES( PRIVATE "${TD_SOURCE_DIR}/source/client/inc" ) -TARGET_INCLUDE_DIRECTORIES( - clientMonitorTest - PUBLIC "${TD_SOURCE_DIR}/include/client/" - PRIVATE "${TD_SOURCE_DIR}/source/client/inc" -) +#TARGET_INCLUDE_DIRECTORIES( +# clientMonitorTest +# PUBLIC "${TD_SOURCE_DIR}/include/client/" +# PRIVATE "${TD_SOURCE_DIR}/source/client/inc" +#) add_test( NAME smlTest