Merge branch '3.0' into merge/mainto3.0
This commit is contained in:
commit
26ba4b1f29
|
@ -97,10 +97,13 @@ ELSE()
|
||||||
SET(TD_TAOS_TOOLS TRUE)
|
SET(TD_TAOS_TOOLS TRUE)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
SET(TAOS_LIB taos)
|
||||||
|
SET(TAOS_LIB_STATIC taos_static)
|
||||||
|
|
||||||
IF(${TD_WINDOWS})
|
IF(${TD_WINDOWS})
|
||||||
SET(TAOS_LIB taos_static)
|
SET(TAOS_LIB_PLATFORM_SPEC taos_static)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(TAOS_LIB taos)
|
SET(TAOS_LIB_PLATFORM_SPEC taos)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# build TSZ by default
|
# build TSZ by default
|
||||||
|
|
|
@ -28,6 +28,9 @@ if(${BUILD_WITH_TRAFT})
|
||||||
# add_subdirectory(traft)
|
# add_subdirectory(traft)
|
||||||
endif(${BUILD_WITH_TRAFT})
|
endif(${BUILD_WITH_TRAFT})
|
||||||
|
|
||||||
add_subdirectory(azure)
|
if(${BUILD_S3})
|
||||||
|
add_subdirectory(azure)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(tdev)
|
add_subdirectory(tdev)
|
||||||
add_subdirectory(lz4)
|
add_subdirectory(lz4)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
PROJECT(TDengine)
|
PROJECT(TDengine)
|
||||||
|
|
||||||
IF (TD_LINUX)
|
IF(TD_LINUX)
|
||||||
INCLUDE_DIRECTORIES(. ${TD_SOURCE_DIR}/src/inc ${TD_SOURCE_DIR}/src/client/inc ${TD_SOURCE_DIR}/inc)
|
INCLUDE_DIRECTORIES(. ${TD_SOURCE_DIR}/src/inc ${TD_SOURCE_DIR}/src/client/inc ${TD_SOURCE_DIR}/inc)
|
||||||
AUX_SOURCE_DIRECTORY(. SRC)
|
AUX_SOURCE_DIRECTORY(. SRC)
|
||||||
|
|
||||||
add_executable(tmq "")
|
add_executable(tmq "")
|
||||||
|
@ -12,58 +12,58 @@ IF (TD_LINUX)
|
||||||
add_executable(asyncdemo "")
|
add_executable(asyncdemo "")
|
||||||
|
|
||||||
target_sources(tmq
|
target_sources(tmq
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"tmq.c"
|
"tmq.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(stream_demo
|
target_sources(stream_demo
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"stream_demo.c"
|
"stream_demo.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(schemaless
|
target_sources(schemaless
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"schemaless.c"
|
"schemaless.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(prepare
|
target_sources(prepare
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"prepare.c"
|
"prepare.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(demo
|
target_sources(demo
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"demo.c"
|
"demo.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(asyncdemo
|
target_sources(asyncdemo
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"asyncdemo.c"
|
"asyncdemo.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(tmq
|
target_link_libraries(tmq
|
||||||
taos
|
${TAOS_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(stream_demo
|
target_link_libraries(stream_demo
|
||||||
taos
|
${TAOS_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(schemaless
|
target_link_libraries(schemaless
|
||||||
taos
|
${TAOS_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(prepare
|
target_link_libraries(prepare
|
||||||
taos
|
${TAOS_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(demo
|
target_link_libraries(demo
|
||||||
taos
|
${TAOS_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(asyncdemo
|
target_link_libraries(asyncdemo
|
||||||
taos
|
${TAOS_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(tmq PROPERTIES OUTPUT_NAME tmq)
|
SET_TARGET_PROPERTIES(tmq PROPERTIES OUTPUT_NAME tmq)
|
||||||
SET_TARGET_PROPERTIES(stream_demo PROPERTIES OUTPUT_NAME stream_demo)
|
SET_TARGET_PROPERTIES(stream_demo PROPERTIES OUTPUT_NAME stream_demo)
|
||||||
|
@ -71,8 +71,9 @@ IF (TD_LINUX)
|
||||||
SET_TARGET_PROPERTIES(prepare PROPERTIES OUTPUT_NAME prepare)
|
SET_TARGET_PROPERTIES(prepare PROPERTIES OUTPUT_NAME prepare)
|
||||||
SET_TARGET_PROPERTIES(demo PROPERTIES OUTPUT_NAME demo)
|
SET_TARGET_PROPERTIES(demo PROPERTIES OUTPUT_NAME demo)
|
||||||
SET_TARGET_PROPERTIES(asyncdemo PROPERTIES OUTPUT_NAME asyncdemo)
|
SET_TARGET_PROPERTIES(asyncdemo PROPERTIES OUTPUT_NAME asyncdemo)
|
||||||
ENDIF ()
|
ENDIF()
|
||||||
IF (TD_DARWIN)
|
|
||||||
INCLUDE_DIRECTORIES(. ${TD_SOURCE_DIR}/src/inc ${TD_SOURCE_DIR}/src/client/inc ${TD_SOURCE_DIR}/inc)
|
IF(TD_DARWIN)
|
||||||
|
INCLUDE_DIRECTORIES(. ${TD_SOURCE_DIR}/src/inc ${TD_SOURCE_DIR}/src/client/inc ${TD_SOURCE_DIR}/inc)
|
||||||
AUX_SOURCE_DIRECTORY(. SRC)
|
AUX_SOURCE_DIRECTORY(. SRC)
|
||||||
ENDIF ()
|
ENDIF()
|
||||||
|
|
|
@ -5,24 +5,24 @@ if(TD_ENTERPRISE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TD_WINDOWS)
|
if(TD_WINDOWS)
|
||||||
add_library(taos SHARED ${CLIENT_SRC} ${CMAKE_CURRENT_SOURCE_DIR}/src/taos.rc.in)
|
add_library(${TAOS_LIB} SHARED ${CLIENT_SRC} ${CMAKE_CURRENT_SOURCE_DIR}/src/taos.rc.in)
|
||||||
else()
|
else()
|
||||||
add_library(taos SHARED ${CLIENT_SRC})
|
add_library(${TAOS_LIB} SHARED ${CLIENT_SRC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${TD_DARWIN})
|
if(${TD_DARWIN})
|
||||||
target_compile_options(taos PRIVATE -Wno-error=deprecated-non-prototype)
|
target_compile_options(${TAOS_LIB} PRIVATE -Wno-error=deprecated-non-prototype)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(jni)
|
INCLUDE_DIRECTORIES(jni)
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
taos
|
${TAOS_LIB}
|
||||||
PUBLIC "${TD_SOURCE_DIR}/include/client"
|
PUBLIC "${TD_SOURCE_DIR}/include/client"
|
||||||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
||||||
)
|
)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
taos
|
${TAOS_LIB}
|
||||||
INTERFACE api
|
INTERFACE api
|
||||||
PRIVATE os util common transport monitor nodes parser command planner catalog scheduler function qcom geometry
|
PRIVATE os util common transport monitor nodes parser command planner catalog scheduler function qcom geometry
|
||||||
)
|
)
|
||||||
|
@ -36,32 +36,32 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
taos
|
${TAOS_LIB}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
CLEAN_DIRECT_OUTPUT
|
CLEAN_DIRECT_OUTPUT
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
taos
|
${TAOS_LIB}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${TD_VER_NUMBER}
|
VERSION ${TD_VER_NUMBER}
|
||||||
SOVERSION 1
|
SOVERSION 1
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(taos_static STATIC ${CLIENT_SRC})
|
add_library(${TAOS_LIB_STATIC} STATIC ${CLIENT_SRC})
|
||||||
|
|
||||||
if(${TD_DARWIN})
|
if(${TD_DARWIN})
|
||||||
target_compile_options(taos_static PRIVATE -Wno-error=deprecated-non-prototype)
|
target_compile_options(${TAOS_LIB_STATIC} PRIVATE -Wno-error=deprecated-non-prototype)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
taos_static
|
${TAOS_LIB_STATIC}
|
||||||
PUBLIC "${TD_SOURCE_DIR}/include/client"
|
PUBLIC "${TD_SOURCE_DIR}/include/client"
|
||||||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
||||||
)
|
)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
taos_static
|
${TAOS_LIB_STATIC}
|
||||||
INTERFACE api
|
INTERFACE api
|
||||||
PRIVATE os util common transport monitor nodes parser command planner catalog scheduler function qcom geometry
|
PRIVATE os util common transport monitor nodes parser command planner catalog scheduler function qcom geometry
|
||||||
)
|
)
|
||||||
|
|
|
@ -1816,7 +1816,7 @@ int32_t doProcessMsgFromServerImpl(SRpcMsg* pMsg, SEpSet* pEpSet) {
|
||||||
.handleRefId = pMsg->info.refId,
|
.handleRefId = pMsg->info.refId,
|
||||||
.pEpSet = pEpSet};
|
.pEpSet = pEpSet};
|
||||||
|
|
||||||
if (pMsg->contLen > 0) {
|
if (pMsg->code != TSDB_CODE_OUT_OF_MEMORY && pMsg->contLen > 0) {
|
||||||
buf.pData = taosMemoryCalloc(1, pMsg->contLen);
|
buf.pData = taosMemoryCalloc(1, pMsg->contLen);
|
||||||
if (buf.pData == NULL) {
|
if (buf.pData == NULL) {
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
@ -2211,7 +2211,7 @@ static int32_t estimateJsonLen(SReqResultInfo* pResultInfo) {
|
||||||
static int32_t doConvertJson(SReqResultInfo* pResultInfo) {
|
static int32_t doConvertJson(SReqResultInfo* pResultInfo) {
|
||||||
int32_t numOfRows = pResultInfo->numOfRows;
|
int32_t numOfRows = pResultInfo->numOfRows;
|
||||||
int32_t numOfCols = pResultInfo->numOfCols;
|
int32_t numOfCols = pResultInfo->numOfCols;
|
||||||
bool needConvert = false;
|
bool needConvert = false;
|
||||||
for (int32_t i = 0; i < numOfCols; ++i) {
|
for (int32_t i = 0; i < numOfCols; ++i) {
|
||||||
if (pResultInfo->fields[i].type == TSDB_DATA_TYPE_JSON) {
|
if (pResultInfo->fields[i].type == TSDB_DATA_TYPE_JSON) {
|
||||||
needConvert = true;
|
needConvert = true;
|
||||||
|
@ -2400,8 +2400,8 @@ int32_t setResultDataPtr(SReqResultInfo* pResultInfo, bool convertUcs4) {
|
||||||
p += sizeof(int32_t);
|
p += sizeof(int32_t);
|
||||||
|
|
||||||
if (rows != pResultInfo->numOfRows || cols != pResultInfo->numOfCols) {
|
if (rows != pResultInfo->numOfRows || cols != pResultInfo->numOfCols) {
|
||||||
tscError("setResultDataPtr paras error:rows;%d numOfRows:%" PRId64 " cols:%d numOfCols:%d", rows, pResultInfo->numOfRows, cols,
|
tscError("setResultDataPtr paras error:rows;%d numOfRows:%" PRId64 " cols:%d numOfCols:%d", rows,
|
||||||
pResultInfo->numOfCols);
|
pResultInfo->numOfRows, cols, pResultInfo->numOfCols);
|
||||||
return TSDB_CODE_TSC_INTERNAL_ERROR;
|
return TSDB_CODE_TSC_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2577,8 +2577,7 @@ int32_t setQueryResultFromRsp(SReqResultInfo* pResultInfo, const SRetrieveTableR
|
||||||
// TODO handle the compressed case
|
// TODO handle the compressed case
|
||||||
pResultInfo->totalRows += pResultInfo->numOfRows;
|
pResultInfo->totalRows += pResultInfo->numOfRows;
|
||||||
|
|
||||||
int32_t code =
|
int32_t code = setResultDataPtr(pResultInfo, convertUcs4);
|
||||||
setResultDataPtr(pResultInfo, convertUcs4);
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,31 +8,31 @@ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST)
|
||||||
ADD_EXECUTABLE(clientTest clientTests.cpp)
|
ADD_EXECUTABLE(clientTest clientTests.cpp)
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
clientTest
|
clientTest
|
||||||
os util common transport parser catalog scheduler gtest taos_static qcom executor function
|
os util common transport parser catalog scheduler gtest ${TAOS_LIB_STATIC} qcom executor function
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_EXECUTABLE(tmqTest tmqTest.cpp)
|
ADD_EXECUTABLE(tmqTest tmqTest.cpp)
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
tmqTest
|
tmqTest
|
||||||
PUBLIC os util common transport parser catalog scheduler function gtest taos_static qcom
|
PUBLIC os util common transport parser catalog scheduler function gtest ${TAOS_LIB_STATIC} qcom
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_EXECUTABLE(smlTest smlTest.cpp)
|
ADD_EXECUTABLE(smlTest smlTest.cpp)
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
smlTest
|
smlTest
|
||||||
PUBLIC os util common transport parser catalog scheduler function gtest taos_static qcom geometry
|
PUBLIC os util common transport parser catalog scheduler function gtest ${TAOS_LIB_STATIC} qcom geometry
|
||||||
)
|
)
|
||||||
|
|
||||||
#ADD_EXECUTABLE(clientMonitorTest clientMonitorTests.cpp)
|
#ADD_EXECUTABLE(clientMonitorTest clientMonitorTests.cpp)
|
||||||
#TARGET_LINK_LIBRARIES(
|
#TARGET_LINK_LIBRARIES(
|
||||||
# clientMonitorTest
|
# clientMonitorTest
|
||||||
# PUBLIC os util common transport monitor parser catalog scheduler function gtest taos_static qcom executor
|
# PUBLIC os util common transport monitor parser catalog scheduler function gtest ${TAOS_LIB_STATIC} qcom executor
|
||||||
#)
|
#)
|
||||||
|
|
||||||
ADD_EXECUTABLE(userOperTest ../../../tests/script/api/passwdTest.c)
|
ADD_EXECUTABLE(userOperTest ../../../tests/script/api/passwdTest.c)
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
userOperTest
|
userOperTest
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
TARGET_INCLUDE_DIRECTORIES(
|
TARGET_INCLUDE_DIRECTORIES(
|
||||||
|
|
|
@ -233,7 +233,9 @@ int32_t vmOpenVnode(SVnodeMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl) {
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)taosThreadRwlockWrlock(&pMgmt->lock);
|
(void)taosThreadRwlockWrlock(&pMgmt->lock);
|
||||||
|
|
||||||
SVnodeObj *pOld = NULL;
|
SVnodeObj *pOld = NULL;
|
||||||
|
|
||||||
int32_t r = taosHashGetDup(pMgmt->hash, &pVnode->vgId, sizeof(int32_t), (void *)&pOld);
|
int32_t r = taosHashGetDup(pMgmt->hash, &pVnode->vgId, sizeof(int32_t), (void *)&pOld);
|
||||||
if (r != 0) {
|
if (r != 0) {
|
||||||
dError("vgId:%d, failed to get vnode from hash", pVnode->vgId);
|
dError("vgId:%d, failed to get vnode from hash", pVnode->vgId);
|
||||||
|
@ -248,15 +250,15 @@ int32_t vmOpenVnode(SVnodeMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl) {
|
||||||
if (r != 0) {
|
if (r != 0) {
|
||||||
dError("vgId:%d, failed to get vnode from closedHash", pVnode->vgId);
|
dError("vgId:%d, failed to get vnode from closedHash", pVnode->vgId);
|
||||||
}
|
}
|
||||||
if (pOld) {
|
if (pOld != NULL) {
|
||||||
vmFreeVnodeObj(&pOld);
|
vmFreeVnodeObj(&pOld);
|
||||||
|
dInfo("vgId:%d, remove from closedHash", pVnode->vgId);
|
||||||
|
r = taosHashRemove(pMgmt->closedHash, &pVnode->vgId, sizeof(int32_t));
|
||||||
|
if (r != 0) {
|
||||||
|
dError("vgId:%d, failed to remove vnode from hash", pVnode->vgId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dInfo("vgId:%d, remove from closedHash", pVnode->vgId);
|
|
||||||
r = taosHashRemove(pMgmt->closedHash, &pVnode->vgId, sizeof(int32_t));
|
|
||||||
if (r != 0) {
|
|
||||||
dError("vgId:%d, failed to remove vnode from hash", pVnode->vgId);
|
|
||||||
}
|
|
||||||
(void)taosThreadRwlockUnlock(&pMgmt->lock);
|
(void)taosThreadRwlockUnlock(&pMgmt->lock);
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
|
|
|
@ -6,5 +6,5 @@ target_include_directories(
|
||||||
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
||||||
)
|
)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
node_util cjson mnode vnode qnode snode wal sync taos_static tfs monitor monitorfw
|
node_util cjson mnode vnode qnode snode wal sync ${TAOS_LIB_STATIC} tfs monitor monitorfw
|
||||||
)
|
)
|
|
@ -360,6 +360,7 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC
|
||||||
info.config = vnodeCfgDefault;
|
info.config = vnodeCfgDefault;
|
||||||
|
|
||||||
// load vnode info
|
// load vnode info
|
||||||
|
vInfo("vgId:%d, start to vnode load info %s", info.config.vgId, dir);
|
||||||
ret = vnodeLoadInfo(dir, &info);
|
ret = vnodeLoadInfo(dir, &info);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
vError("failed to open vnode from %s since %s", path, tstrerror(terrno));
|
vError("failed to open vnode from %s since %s", path, tstrerror(terrno));
|
||||||
|
@ -429,22 +430,26 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC
|
||||||
int8_t rollback = vnodeShouldRollback(pVnode);
|
int8_t rollback = vnodeShouldRollback(pVnode);
|
||||||
|
|
||||||
// open buffer pool
|
// open buffer pool
|
||||||
|
vInfo("vgId:%d, start to open vnode buffer pool", TD_VID(pVnode));
|
||||||
if (vnodeOpenBufPool(pVnode) < 0) {
|
if (vnodeOpenBufPool(pVnode) < 0) {
|
||||||
vError("vgId:%d, failed to open vnode buffer pool since %s", TD_VID(pVnode), tstrerror(terrno));
|
vError("vgId:%d, failed to open vnode buffer pool since %s", TD_VID(pVnode), tstrerror(terrno));
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
// open meta
|
// open meta
|
||||||
|
vInfo("vgId:%d, start to open vnode meta", TD_VID(pVnode));
|
||||||
if (metaOpen(pVnode, &pVnode->pMeta, rollback) < 0) {
|
if (metaOpen(pVnode, &pVnode->pMeta, rollback) < 0) {
|
||||||
vError("vgId:%d, failed to open vnode meta since %s", TD_VID(pVnode), tstrerror(terrno));
|
vError("vgId:%d, failed to open vnode meta since %s", TD_VID(pVnode), tstrerror(terrno));
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vInfo("vgId:%d, start to upgrade meta", TD_VID(pVnode));
|
||||||
if (metaUpgrade(pVnode, &pVnode->pMeta) < 0) {
|
if (metaUpgrade(pVnode, &pVnode->pMeta) < 0) {
|
||||||
vError("vgId:%d, failed to upgrade meta since %s", TD_VID(pVnode), tstrerror(terrno));
|
vError("vgId:%d, failed to upgrade meta since %s", TD_VID(pVnode), tstrerror(terrno));
|
||||||
}
|
}
|
||||||
|
|
||||||
// open tsdb
|
// open tsdb
|
||||||
|
vInfo("vgId:%d, start to open vnode tsdb", TD_VID(pVnode));
|
||||||
if (!VND_IS_RSMA(pVnode) && tsdbOpen(pVnode, &VND_TSDB(pVnode), VNODE_TSDB_DIR, NULL, rollback, force) < 0) {
|
if (!VND_IS_RSMA(pVnode) && tsdbOpen(pVnode, &VND_TSDB(pVnode), VNODE_TSDB_DIR, NULL, rollback, force) < 0) {
|
||||||
vError("vgId:%d, failed to open vnode tsdb since %s", TD_VID(pVnode), tstrerror(terrno));
|
vError("vgId:%d, failed to open vnode tsdb since %s", TD_VID(pVnode), tstrerror(terrno));
|
||||||
goto _err;
|
goto _err;
|
||||||
|
@ -455,6 +460,7 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC
|
||||||
ret = taosRealPath(tdir, NULL, sizeof(tdir));
|
ret = taosRealPath(tdir, NULL, sizeof(tdir));
|
||||||
TAOS_UNUSED(ret);
|
TAOS_UNUSED(ret);
|
||||||
|
|
||||||
|
vInfo("vgId:%d, start to open vnode wal", TD_VID(pVnode));
|
||||||
pVnode->pWal = walOpen(tdir, &(pVnode->config.walCfg));
|
pVnode->pWal = walOpen(tdir, &(pVnode->config.walCfg));
|
||||||
if (pVnode->pWal == NULL) {
|
if (pVnode->pWal == NULL) {
|
||||||
vError("vgId:%d, failed to open vnode wal since %s. wal:%s", TD_VID(pVnode), tstrerror(terrno), tdir);
|
vError("vgId:%d, failed to open vnode wal since %s. wal:%s", TD_VID(pVnode), tstrerror(terrno), tdir);
|
||||||
|
@ -467,6 +473,7 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC
|
||||||
TAOS_UNUSED(ret);
|
TAOS_UNUSED(ret);
|
||||||
|
|
||||||
// open query
|
// open query
|
||||||
|
vInfo("vgId:%d, start to open vnode query", TD_VID(pVnode));
|
||||||
if (vnodeQueryOpen(pVnode)) {
|
if (vnodeQueryOpen(pVnode)) {
|
||||||
vError("vgId:%d, failed to open vnode query since %s", TD_VID(pVnode), tstrerror(terrno));
|
vError("vgId:%d, failed to open vnode query since %s", TD_VID(pVnode), tstrerror(terrno));
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
@ -474,18 +481,21 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC
|
||||||
}
|
}
|
||||||
|
|
||||||
// sma required the tq is initialized before the vnode open
|
// sma required the tq is initialized before the vnode open
|
||||||
|
vInfo("vgId:%d, start to open vnode tq", TD_VID(pVnode));
|
||||||
if (tqOpen(tdir, pVnode)) {
|
if (tqOpen(tdir, pVnode)) {
|
||||||
vError("vgId:%d, failed to open vnode tq since %s", TD_VID(pVnode), tstrerror(terrno));
|
vError("vgId:%d, failed to open vnode tq since %s", TD_VID(pVnode), tstrerror(terrno));
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
// open sma
|
// open sma
|
||||||
|
vInfo("vgId:%d, start to open vnode sma", TD_VID(pVnode));
|
||||||
if (smaOpen(pVnode, rollback, force)) {
|
if (smaOpen(pVnode, rollback, force)) {
|
||||||
vError("vgId:%d, failed to open vnode sma since %s", TD_VID(pVnode), tstrerror(terrno));
|
vError("vgId:%d, failed to open vnode sma since %s", TD_VID(pVnode), tstrerror(terrno));
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
// vnode begin
|
// vnode begin
|
||||||
|
vInfo("vgId:%d, start to begin vnode", TD_VID(pVnode));
|
||||||
if (vnodeBegin(pVnode) < 0) {
|
if (vnodeBegin(pVnode) < 0) {
|
||||||
vError("vgId:%d, failed to begin since %s", TD_VID(pVnode), tstrerror(terrno));
|
vError("vgId:%d, failed to begin since %s", TD_VID(pVnode), tstrerror(terrno));
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
|
|
@ -9,7 +9,7 @@ IF(NOT TD_DARWIN)
|
||||||
ADD_EXECUTABLE(catalogTest ${SOURCE_LIST})
|
ADD_EXECUTABLE(catalogTest ${SOURCE_LIST})
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
catalogTest
|
catalogTest
|
||||||
PUBLIC os util common nodes catalog transport gtest qcom taos_static
|
PUBLIC os util common nodes catalog transport gtest qcom ${TAOS_LIB_STATIC}
|
||||||
)
|
)
|
||||||
|
|
||||||
TARGET_INCLUDE_DIRECTORIES(
|
TARGET_INCLUDE_DIRECTORIES(
|
||||||
|
|
|
@ -9,7 +9,7 @@ MESSAGE(STATUS "build parser unit test")
|
||||||
# ADD_EXECUTABLE(executorTest ${SOURCE_LIST})
|
# ADD_EXECUTABLE(executorTest ${SOURCE_LIST})
|
||||||
# TARGET_LINK_LIBRARIES(
|
# TARGET_LINK_LIBRARIES(
|
||||||
# executorTest
|
# executorTest
|
||||||
# PRIVATE os util common transport gtest taos_static qcom executor function planner scalar nodes vnode
|
# PRIVATE os util common transport gtest ${TAOS_LIB_STATIC} qcom executor function planner scalar nodes vnode
|
||||||
# )
|
# )
|
||||||
#
|
#
|
||||||
# TARGET_INCLUDE_DIRECTORIES(
|
# TARGET_INCLUDE_DIRECTORIES(
|
||||||
|
|
|
@ -681,11 +681,25 @@ int32_t qBindStmtStbColsValue2(void* pBlock, SArray* pCols, TAOS_STMT2_BIND* bin
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
int16_t lastColId = -1;
|
int16_t lastColId = -1;
|
||||||
bool colInOrder = true;
|
bool colInOrder = true;
|
||||||
|
int ncharColNums = 0;
|
||||||
|
|
||||||
if (NULL == *pTSchema) {
|
if (NULL == *pTSchema) {
|
||||||
*pTSchema = tBuildTSchema(pSchema, pDataBlock->pMeta->tableInfo.numOfColumns, pDataBlock->pMeta->sversion);
|
*pTSchema = tBuildTSchema(pSchema, pDataBlock->pMeta->tableInfo.numOfColumns, pDataBlock->pMeta->sversion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int c = 0; c < boundInfo->numOfBound; ++c) {
|
||||||
|
if (TSDB_DATA_TYPE_NCHAR == pSchema[boundInfo->pColIndex[c]].type) {
|
||||||
|
ncharColNums++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ncharColNums > 0) {
|
||||||
|
ncharBinds = taosArrayInit(ncharColNums, sizeof(ncharBind));
|
||||||
|
if (!ncharBinds) {
|
||||||
|
code = terrno;
|
||||||
|
goto _return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int c = 0; c < boundInfo->numOfBound; ++c) {
|
for (int c = 0; c < boundInfo->numOfBound; ++c) {
|
||||||
SSchema* pColSchema = &pSchema[boundInfo->pColIndex[c]];
|
SSchema* pColSchema = &pSchema[boundInfo->pColIndex[c]];
|
||||||
if (pColSchema->colId <= lastColId) {
|
if (pColSchema->colId <= lastColId) {
|
||||||
|
@ -710,13 +724,6 @@ int32_t qBindStmtStbColsValue2(void* pBlock, SArray* pCols, TAOS_STMT2_BIND* bin
|
||||||
if (code) {
|
if (code) {
|
||||||
goto _return;
|
goto _return;
|
||||||
}
|
}
|
||||||
if (!ncharBinds) {
|
|
||||||
ncharBinds = taosArrayInit(1, sizeof(ncharBind));
|
|
||||||
if (!ncharBinds) {
|
|
||||||
code = terrno;
|
|
||||||
goto _return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!taosArrayPush(ncharBinds, &ncharBind)) {
|
if (!taosArrayPush(ncharBinds, &ncharBind)) {
|
||||||
code = terrno;
|
code = terrno;
|
||||||
goto _return;
|
goto _return;
|
||||||
|
|
|
@ -11,12 +11,12 @@ IF(NOT TD_DARWIN)
|
||||||
IF (TD_GRANT)
|
IF (TD_GRANT)
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
schedulerTest
|
schedulerTest
|
||||||
PUBLIC os util common catalog transport gtest qcom taos_static planner scheduler grant
|
PUBLIC os util common catalog transport gtest qcom ${TAOS_LIB_STATIC} planner scheduler grant
|
||||||
)
|
)
|
||||||
ELSE ()
|
ELSE ()
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
schedulerTest
|
schedulerTest
|
||||||
PUBLIC os util common catalog transport gtest qcom taos_static planner scheduler
|
PUBLIC os util common catalog transport gtest qcom ${TAOS_LIB_STATIC} planner scheduler
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ int32_t syncNodeOnAppendEntries(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
|
||||||
goto _IGNORE;
|
goto _IGNORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t nRef = atomic_fetch_add_32(&ths->recvCount, 1);
|
int32_t nRef = atomic_add_fetch_32(&ths->recvCount, 1);
|
||||||
if (nRef <= 0) {
|
if (nRef <= 0) {
|
||||||
sError("vgId:%d, recv count is %d", ths->vgId, nRef);
|
sError("vgId:%d, recv count is %d", ths->vgId, nRef);
|
||||||
}
|
}
|
||||||
|
|
|
@ -980,8 +980,12 @@ static int32_t syncHbTimerStart(SSyncNode* pSyncNode, SSyncTimer* pSyncTimer) {
|
||||||
sTrace("vgId:%d, start hb timer, rid:%" PRId64 " addr:%" PRId64 " at %d", pSyncNode->vgId, pData->rid,
|
sTrace("vgId:%d, start hb timer, rid:%" PRId64 " addr:%" PRId64 " at %d", pSyncNode->vgId, pData->rid,
|
||||||
pData->destId.addr, pSyncTimer->timerMS);
|
pData->destId.addr, pSyncTimer->timerMS);
|
||||||
|
|
||||||
TAOS_CHECK_RETURN(taosTmrReset(pSyncTimer->timerCb, pSyncTimer->timerMS, (void*)(pData->rid),
|
bool stopped = taosTmrReset(pSyncTimer->timerCb, pSyncTimer->timerMS, (void*)(pData->rid), syncEnv()->pTimerManager,
|
||||||
syncEnv()->pTimerManager, &pSyncTimer->pTimer));
|
&pSyncTimer->pTimer);
|
||||||
|
if (stopped) {
|
||||||
|
sError("vgId:%d, failed to reset hb timer success", pSyncNode->vgId);
|
||||||
|
return TSDB_CODE_SYN_INTERNAL_ERROR;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
code = TSDB_CODE_SYN_INTERNAL_ERROR;
|
code = TSDB_CODE_SYN_INTERNAL_ERROR;
|
||||||
sError("vgId:%d, start ctrl hb timer error, sync env is stop", pSyncNode->vgId);
|
sError("vgId:%d, start ctrl hb timer error, sync env is stop", pSyncNode->vgId);
|
||||||
|
@ -1624,8 +1628,12 @@ ESyncStrategy syncNodeStrategy(SSyncNode* pSyncNode) { return pSyncNode->raftCfg
|
||||||
int32_t syncNodeStartPingTimer(SSyncNode* pSyncNode) {
|
int32_t syncNodeStartPingTimer(SSyncNode* pSyncNode) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
if (syncIsInit()) {
|
if (syncIsInit()) {
|
||||||
TAOS_CHECK_RETURN(taosTmrReset(pSyncNode->FpPingTimerCB, pSyncNode->pingTimerMS, (void*)pSyncNode->rid,
|
bool stopped = taosTmrReset(pSyncNode->FpPingTimerCB, pSyncNode->pingTimerMS, (void*)pSyncNode->rid,
|
||||||
syncEnv()->pTimerManager, &pSyncNode->pPingTimer));
|
syncEnv()->pTimerManager, &pSyncNode->pPingTimer);
|
||||||
|
if (stopped) {
|
||||||
|
sError("vgId:%d, failed to reset ping timer, ms:%d", pSyncNode->vgId, pSyncNode->pingTimerMS);
|
||||||
|
return TSDB_CODE_SYN_INTERNAL_ERROR;
|
||||||
|
}
|
||||||
atomic_store_64(&pSyncNode->pingTimerLogicClock, pSyncNode->pingTimerLogicClockUser);
|
atomic_store_64(&pSyncNode->pingTimerLogicClock, pSyncNode->pingTimerLogicClockUser);
|
||||||
} else {
|
} else {
|
||||||
sError("vgId:%d, start ping timer error, sync env is stop", pSyncNode->vgId);
|
sError("vgId:%d, start ping timer error, sync env is stop", pSyncNode->vgId);
|
||||||
|
@ -1653,8 +1661,9 @@ int32_t syncNodeStartElectTimer(SSyncNode* pSyncNode, int32_t ms) {
|
||||||
pSyncNode->electTimerParam.pSyncNode = pSyncNode;
|
pSyncNode->electTimerParam.pSyncNode = pSyncNode;
|
||||||
pSyncNode->electTimerParam.pData = NULL;
|
pSyncNode->electTimerParam.pData = NULL;
|
||||||
|
|
||||||
TAOS_CHECK_RETURN(taosTmrReset(pSyncNode->FpElectTimerCB, pSyncNode->electTimerMS, (void*)(pSyncNode->rid),
|
bool stopped = taosTmrReset(pSyncNode->FpElectTimerCB, pSyncNode->electTimerMS, (void*)(pSyncNode->rid),
|
||||||
syncEnv()->pTimerManager, &pSyncNode->pElectTimer));
|
syncEnv()->pTimerManager, &pSyncNode->pElectTimer);
|
||||||
|
if (stopped) sError("vgId:%d, failed to reset elect timer, ms:%d", pSyncNode->vgId, ms);
|
||||||
} else {
|
} else {
|
||||||
sError("vgId:%d, start elect timer error, sync env is stop", pSyncNode->vgId);
|
sError("vgId:%d, start elect timer error, sync env is stop", pSyncNode->vgId);
|
||||||
}
|
}
|
||||||
|
@ -1690,7 +1699,7 @@ void syncNodeResetElectTimer(SSyncNode* pSyncNode) {
|
||||||
|
|
||||||
// TODO check return value
|
// TODO check return value
|
||||||
if ((code = syncNodeRestartElectTimer(pSyncNode, electMS)) != 0) {
|
if ((code = syncNodeRestartElectTimer(pSyncNode, electMS)) != 0) {
|
||||||
sError("vgId:%d, failed to restart elect timer since %s", pSyncNode->vgId, terrstr());
|
sError("vgId:%d, failed to restart elect timer since %s", pSyncNode->vgId, tstrerror(code));
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2586,10 +2595,9 @@ static void syncNodeEqPingTimer(void* param, void* tmrId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_out:
|
_out:
|
||||||
if ((code = taosTmrReset(syncNodeEqPingTimer, pNode->pingTimerMS, (void*)pNode->rid, syncEnv()->pTimerManager,
|
if (taosTmrReset(syncNodeEqPingTimer, pNode->pingTimerMS, (void*)pNode->rid, syncEnv()->pTimerManager,
|
||||||
&pNode->pPingTimer)) != 0) {
|
&pNode->pPingTimer))
|
||||||
sError("failed to reset ping timer since %s", tstrerror(code));
|
sError("failed to reset ping timer");
|
||||||
};
|
|
||||||
}
|
}
|
||||||
syncNodeRelease(pNode);
|
syncNodeRelease(pNode);
|
||||||
}
|
}
|
||||||
|
@ -2759,13 +2767,10 @@ static void syncNodeEqPeerHeartbeatTimer(void* param, void* tmrId) {
|
||||||
|
|
||||||
if (syncIsInit()) {
|
if (syncIsInit()) {
|
||||||
sTrace("vgId:%d, reset peer hb timer at %d", pSyncNode->vgId, pSyncTimer->timerMS);
|
sTrace("vgId:%d, reset peer hb timer at %d", pSyncNode->vgId, pSyncTimer->timerMS);
|
||||||
if ((code = taosTmrReset(syncNodeEqPeerHeartbeatTimer, pSyncTimer->timerMS, (void*)hbDataRid,
|
bool stopped = taosTmrReset(syncNodeEqPeerHeartbeatTimer, pSyncTimer->timerMS, (void*)hbDataRid,
|
||||||
syncEnv()->pTimerManager, &pSyncTimer->pTimer)) != 0) {
|
syncEnv()->pTimerManager, &pSyncTimer->pTimer);
|
||||||
sError("vgId:%d, reset peer hb timer error, %s", pSyncNode->vgId, tstrerror(code));
|
if (stopped) sError("vgId:%d, reset peer hb timer error, %s", pSyncNode->vgId, tstrerror(code));
|
||||||
syncNodeRelease(pSyncNode);
|
|
||||||
syncHbTimerDataRelease(pData);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
sError("sync env is stop, reset peer hb timer error");
|
sError("sync env is stop, reset peer hb timer error");
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ int32_t syncNodeSendAppendEntries(SSyncNode* pSyncNode, const SRaftId* destRaftI
|
||||||
|
|
||||||
int32_t nRef = 0;
|
int32_t nRef = 0;
|
||||||
if (pSyncNode != NULL) {
|
if (pSyncNode != NULL) {
|
||||||
nRef = atomic_fetch_add_32(&pSyncNode->sendCount, 1);
|
nRef = atomic_add_fetch_32(&pSyncNode->sendCount, 1);
|
||||||
if (nRef <= 0) {
|
if (nRef <= 0) {
|
||||||
sError("vgId:%d, send count is %d", pSyncNode->vgId, nRef);
|
sError("vgId:%d, send count is %d", pSyncNode->vgId, nRef);
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ int32_t syncNodeSendAppendEntries(SSyncNode* pSyncNode, const SRaftId* destRaftI
|
||||||
|
|
||||||
SSyncLogReplMgr* mgr = syncNodeGetLogReplMgr(pSyncNode, (SRaftId*)destRaftId);
|
SSyncLogReplMgr* mgr = syncNodeGetLogReplMgr(pSyncNode, (SRaftId*)destRaftId);
|
||||||
if (mgr != NULL) {
|
if (mgr != NULL) {
|
||||||
nRef = atomic_fetch_add_32(&mgr->sendCount, 1);
|
nRef = atomic_add_fetch_32(&mgr->sendCount, 1);
|
||||||
if (nRef <= 0) {
|
if (nRef <= 0) {
|
||||||
sError("vgId:%d, send count is %d", pSyncNode->vgId, nRef);
|
sError("vgId:%d, send count is %d", pSyncNode->vgId, nRef);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2017,7 +2017,9 @@ void cliHandleBatchReq(SCliThrd* pThrd, SCliReq* pReq) {
|
||||||
tWarn("%s conn %p failed to added to heap cache since %s", pInst->label, pConn, tstrerror(code));
|
tWarn("%s conn %p failed to added to heap cache since %s", pInst->label, pConn, tstrerror(code));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// TAOS_CHECK_GOTO(code, &lino, _exception);
|
if (code == TSDB_CODE_OUT_OF_MEMORY && pConn == NULL) {
|
||||||
|
TAOS_CHECK_GOTO(code, &lino, _exception);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2496,10 +2498,6 @@ static int32_t createThrdObj(void* trans, SCliThrd** ppThrd) {
|
||||||
_end:
|
_end:
|
||||||
if (pThrd) {
|
if (pThrd) {
|
||||||
TAOS_UNUSED(taosThreadMutexDestroy(&pThrd->msgMtx));
|
TAOS_UNUSED(taosThreadMutexDestroy(&pThrd->msgMtx));
|
||||||
|
|
||||||
TAOS_UNUSED(uv_loop_close(pThrd->loop));
|
|
||||||
taosMemoryFree(pThrd->loop);
|
|
||||||
TAOS_UNUSED((taosThreadMutexDestroy(&pThrd->msgMtx)));
|
|
||||||
transAsyncPoolDestroy(pThrd->asyncPool);
|
transAsyncPoolDestroy(pThrd->asyncPool);
|
||||||
for (int i = 0; i < taosArrayGetSize(pThrd->timerList); i++) {
|
for (int i = 0; i < taosArrayGetSize(pThrd->timerList); i++) {
|
||||||
uv_timer_t* timer = taosArrayGetP(pThrd->timerList, i);
|
uv_timer_t* timer = taosArrayGetP(pThrd->timerList, i);
|
||||||
|
@ -2509,6 +2507,9 @@ _end:
|
||||||
taosArrayDestroy(pThrd->timerList);
|
taosArrayDestroy(pThrd->timerList);
|
||||||
|
|
||||||
TAOS_UNUSED(destroyConnPool(pThrd));
|
TAOS_UNUSED(destroyConnPool(pThrd));
|
||||||
|
TAOS_UNUSED(uv_loop_close(pThrd->loop));
|
||||||
|
taosMemoryFree(pThrd->loop);
|
||||||
|
|
||||||
transDQDestroy(pThrd->delayQueue, NULL);
|
transDQDestroy(pThrd->delayQueue, NULL);
|
||||||
transDQDestroy(pThrd->timeoutQueue, NULL);
|
transDQDestroy(pThrd->timeoutQueue, NULL);
|
||||||
transDQDestroy(pThrd->waitConnQueue, NULL);
|
transDQDestroy(pThrd->waitConnQueue, NULL);
|
||||||
|
@ -2927,6 +2928,7 @@ bool cliMayRetry(SCliConn* pConn, SCliReq* pReq, STransMsg* pResp) {
|
||||||
transFreeMsg(pResp->pCont);
|
transFreeMsg(pResp->pCont);
|
||||||
}
|
}
|
||||||
pResp->pCont = NULL;
|
pResp->pCont = NULL;
|
||||||
|
pResp->info.hasEpSet = 0;
|
||||||
if (code != TSDB_CODE_RPC_BROKEN_LINK && code != TSDB_CODE_RPC_NETWORK_UNAVAIL && code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_RPC_BROKEN_LINK && code != TSDB_CODE_RPC_NETWORK_UNAVAIL && code != TSDB_CODE_SUCCESS) {
|
||||||
// save one internal code
|
// save one internal code
|
||||||
pCtx->retryCode = code;
|
pCtx->retryCode = code;
|
||||||
|
|
|
@ -1320,8 +1320,6 @@ static FORCE_INLINE SSvrConn* createConn(void* hThrd) {
|
||||||
TAOS_CHECK_GOTO(TSDB_CODE_REF_INVALID_ID, &lino, _end);
|
TAOS_CHECK_GOTO(TSDB_CODE_REF_INVALID_ID, &lino, _end);
|
||||||
}
|
}
|
||||||
|
|
||||||
QUEUE_INIT(&exh->q);
|
|
||||||
|
|
||||||
SExHandle* pSelf = transAcquireExHandle(uvGetConnRefOfThrd(pThrd), exh->refId);
|
SExHandle* pSelf = transAcquireExHandle(uvGetConnRefOfThrd(pThrd), exh->refId);
|
||||||
if (pSelf != exh) {
|
if (pSelf != exh) {
|
||||||
TAOS_CHECK_GOTO(TSDB_CODE_REF_INVALID_ID, NULL, _end);
|
TAOS_CHECK_GOTO(TSDB_CODE_REF_INVALID_ID, NULL, _end);
|
||||||
|
@ -1369,6 +1367,12 @@ static FORCE_INLINE SSvrConn* createConn(void* hThrd) {
|
||||||
return pConn;
|
return pConn;
|
||||||
_end:
|
_end:
|
||||||
if (pConn) {
|
if (pConn) {
|
||||||
|
if (pConn->refId > 0) {
|
||||||
|
transReleaseExHandle(uvGetConnRefOfThrd(pThrd), pConn->refId);
|
||||||
|
transRemoveExHandle(uvGetConnRefOfThrd(pThrd), pConn->refId);
|
||||||
|
pConn->refId = -1;
|
||||||
|
}
|
||||||
|
|
||||||
transQueueDestroy(&pConn->resps);
|
transQueueDestroy(&pConn->resps);
|
||||||
transDestroyBuffer(&pConn->readBuf);
|
transDestroyBuffer(&pConn->readBuf);
|
||||||
taosHashCleanup(pConn->pQTable);
|
taosHashCleanup(pConn->pQTable);
|
||||||
|
@ -1378,7 +1382,7 @@ _end:
|
||||||
taosMemoryFree(pConn);
|
taosMemoryFree(pConn);
|
||||||
pConn = NULL;
|
pConn = NULL;
|
||||||
}
|
}
|
||||||
tError("%s failed to create conn since %s" PRId64, transLabel(pInst), tstrerror(code));
|
tError("%s failed to create conn since %s", transLabel(pInst), tstrerror(code));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,91 @@
|
||||||
|
[10/28 19:12:21.666563] SUCC: created database (db_sub)
|
||||||
|
[10/28 19:12:21.694603] INFO: start creating 1000 table(s) with 8 thread(s)
|
||||||
|
[10/28 19:12:21.823202] SUCC: Spent 0.1290 seconds to create 1000 table(s) with 8 thread(s) speed: 7752 tables/s, already exist 0 table(s), actual 1000 table(s) pre created, 0 table(s) will be auto created
|
||||||
|
[10/28 19:12:22.127442] SUCC: thread[4] progressive mode, completed total inserted rows: 125000, 441047.79 records/second
|
||||||
|
[10/28 19:12:22.128649] SUCC: thread[7] progressive mode, completed total inserted rows: 125000, 440895.33 records/second
|
||||||
|
[10/28 19:12:22.129478] SUCC: thread[5] progressive mode, completed total inserted rows: 125000, 440151.69 records/second
|
||||||
|
[10/28 19:12:22.133756] SUCC: thread[1] progressive mode, completed total inserted rows: 125000, 433268.05 records/second
|
||||||
|
[10/28 19:12:22.135211] SUCC: thread[3] progressive mode, completed total inserted rows: 125000, 430329.63 records/second
|
||||||
|
[10/28 19:12:22.137335] SUCC: thread[0] progressive mode, completed total inserted rows: 125000, 425800.08 records/second
|
||||||
|
[10/28 19:12:22.138252] SUCC: thread[6] progressive mode, completed total inserted rows: 125000, 426330.15 records/second
|
||||||
|
[10/28 19:12:22.141351] SUCC: thread[2] progressive mode, completed total inserted rows: 125000, 422778.64 records/second
|
||||||
|
[10/28 19:12:22.141585] SUCC: Spent 0.311648 (real 0.289041) seconds to insert rows: 1000000 with 8 thread(s) into db_sub 3208748.33 (real 3459716.79) records/second
|
||||||
|
[10/28 19:12:22.141590] SUCC: insert delay, min: 0.9600ms, avg: 2.3123ms, p90: 3.1790ms, p95: 3.5080ms, p99: 4.2230ms, max: 4.9040ms
|
||||||
|
[10/28 19:28:50.798427] SUCC: created database (db_sub)
|
||||||
|
[10/28 19:28:50.828326] INFO: start creating 1000 table(s) with 8 thread(s)
|
||||||
|
[10/28 19:28:50.936429] SUCC: Spent 0.1080 seconds to create 1000 table(s) with 8 thread(s) speed: 9259 tables/s, already exist 0 table(s), actual 1000 table(s) pre created, 0 table(s) will be auto created
|
||||||
|
[10/28 19:28:51.187235] SUCC: thread[6] progressive mode, completed total inserted rows: 125000, 539204.48 records/second
|
||||||
|
[10/28 19:28:51.189941] SUCC: thread[2] progressive mode, completed total inserted rows: 125000, 532329.43 records/second
|
||||||
|
[10/28 19:28:51.191551] SUCC: thread[4] progressive mode, completed total inserted rows: 125000, 530954.66 records/second
|
||||||
|
[10/28 19:28:51.191858] SUCC: thread[1] progressive mode, completed total inserted rows: 125000, 529259.59 records/second
|
||||||
|
[10/28 19:28:51.192459] SUCC: thread[3] progressive mode, completed total inserted rows: 125000, 530229.44 records/second
|
||||||
|
[10/28 19:28:51.195372] SUCC: thread[7] progressive mode, completed total inserted rows: 125000, 522099.42 records/second
|
||||||
|
[10/28 19:28:51.197727] SUCC: thread[0] progressive mode, completed total inserted rows: 125000, 516620.72 records/second
|
||||||
|
[10/28 19:28:51.197883] SUCC: thread[5] progressive mode, completed total inserted rows: 125000, 517125.12 records/second
|
||||||
|
[10/28 19:28:51.198123] SUCC: Spent 0.255536 (real 0.237135) seconds to insert rows: 1000000 with 8 thread(s) into db_sub 3913342.93 (real 4217007.19) records/second
|
||||||
|
[10/28 19:28:51.198130] SUCC: insert delay, min: 0.9200ms, avg: 1.8971ms, p90: 2.6870ms, p95: 2.9520ms, p99: 3.5880ms, max: 4.0710ms
|
||||||
|
[10/28 19:31:44.377691] SUCC: created database (db_sub)
|
||||||
|
[10/28 19:31:44.392998] INFO: start creating 1000 table(s) with 8 thread(s)
|
||||||
|
[10/28 19:31:44.696768] SUCC: Spent 0.3040 seconds to create 1000 table(s) with 8 thread(s) speed: 3289 tables/s, already exist 0 table(s), actual 1000 table(s) pre created, 0 table(s) will be auto created
|
||||||
|
[10/28 19:31:45.126910] SUCC: thread[3] progressive mode, completed total inserted rows: 125000, 304775.47 records/second
|
||||||
|
[10/28 19:31:45.131979] SUCC: thread[0] progressive mode, completed total inserted rows: 125000, 301117.75 records/second
|
||||||
|
[10/28 19:31:45.135106] SUCC: thread[5] progressive mode, completed total inserted rows: 125000, 299854.39 records/second
|
||||||
|
[10/28 19:31:45.135675] SUCC: thread[4] progressive mode, completed total inserted rows: 125000, 298322.24 records/second
|
||||||
|
[10/28 19:31:45.137069] SUCC: thread[7] progressive mode, completed total inserted rows: 125000, 297733.89 records/second
|
||||||
|
[10/28 19:31:45.137952] SUCC: thread[1] progressive mode, completed total inserted rows: 125000, 296900.13 records/second
|
||||||
|
[10/28 19:31:45.138834] SUCC: thread[2] progressive mode, completed total inserted rows: 125000, 295170.54 records/second
|
||||||
|
[10/28 19:31:45.145048] SUCC: thread[6] progressive mode, completed total inserted rows: 125000, 291966.71 records/second
|
||||||
|
[10/28 19:31:45.145369] SUCC: Spent 0.442506 (real 0.419200) seconds to insert rows: 1000000 with 8 thread(s) into db_sub 2259856.36 (real 2385496.18) records/second
|
||||||
|
[10/28 19:31:45.145377] SUCC: insert delay, min: 1.0400ms, avg: 3.3536ms, p90: 5.3120ms, p95: 7.9660ms, p99: 13.1570ms, max: 19.1410ms
|
||||||
|
[10/28 19:44:19.873056] SUCC: created database (db_sub)
|
||||||
|
[10/28 19:44:19.904701] INFO: start creating 1000 table(s) with 8 thread(s)
|
||||||
|
[10/28 19:44:20.053846] SUCC: Spent 0.1490 seconds to create 1000 table(s) with 8 thread(s) speed: 6711 tables/s, already exist 0 table(s), actual 1000 table(s) pre created, 0 table(s) will be auto created
|
||||||
|
[10/28 19:44:20.328698] SUCC: thread[3] progressive mode, completed total inserted rows: 125000, 485742.49 records/second
|
||||||
|
[10/28 19:44:20.330777] SUCC: thread[2] progressive mode, completed total inserted rows: 125000, 481686.29 records/second
|
||||||
|
[10/28 19:44:20.331290] SUCC: thread[4] progressive mode, completed total inserted rows: 125000, 480911.65 records/second
|
||||||
|
[10/28 19:44:20.331665] SUCC: thread[1] progressive mode, completed total inserted rows: 125000, 481043.06 records/second
|
||||||
|
[10/28 19:44:20.333451] SUCC: thread[0] progressive mode, completed total inserted rows: 125000, 477172.09 records/second
|
||||||
|
[10/28 19:44:20.334745] SUCC: thread[5] progressive mode, completed total inserted rows: 125000, 475675.84 records/second
|
||||||
|
[10/28 19:44:20.335056] SUCC: thread[6] progressive mode, completed total inserted rows: 125000, 474158.37 records/second
|
||||||
|
[10/28 19:44:20.337919] SUCC: thread[7] progressive mode, completed total inserted rows: 125000, 470816.89 records/second
|
||||||
|
[10/28 19:44:20.338144] SUCC: Spent 0.277921 (real 0.261310) seconds to insert rows: 1000000 with 8 thread(s) into db_sub 3598144.80 (real 3826872.30) records/second
|
||||||
|
[10/28 19:44:20.338153] SUCC: insert delay, min: 0.9180ms, avg: 2.0905ms, p90: 2.6490ms, p95: 3.0620ms, p99: 4.1480ms, max: 4.7840ms
|
||||||
|
[10/28 19:58:27.100989] SUCC: created database (db_sub)
|
||||||
|
[10/28 19:58:27.115572] INFO: start creating 1000 table(s) with 8 thread(s)
|
||||||
|
[10/28 19:58:27.362948] SUCC: Spent 0.2470 seconds to create 1000 table(s) with 8 thread(s) speed: 4049 tables/s, already exist 0 table(s), actual 1000 table(s) pre created, 0 table(s) will be auto created
|
||||||
|
[10/28 19:58:27.807669] SUCC: thread[7] progressive mode, completed total inserted rows: 125000, 291891.03 records/second
|
||||||
|
[10/28 19:58:27.818785] SUCC: thread[1] progressive mode, completed total inserted rows: 125000, 285413.54 records/second
|
||||||
|
[10/28 19:58:27.819649] SUCC: thread[0] progressive mode, completed total inserted rows: 125000, 284193.61 records/second
|
||||||
|
[10/28 19:58:27.819844] SUCC: thread[5] progressive mode, completed total inserted rows: 125000, 284352.64 records/second
|
||||||
|
[10/28 19:58:27.820170] SUCC: thread[6] progressive mode, completed total inserted rows: 125000, 284576.63 records/second
|
||||||
|
[10/28 19:58:27.821489] SUCC: thread[4] progressive mode, completed total inserted rows: 125000, 283781.33 records/second
|
||||||
|
[10/28 19:58:27.822061] SUCC: thread[2] progressive mode, completed total inserted rows: 125000, 283112.24 records/second
|
||||||
|
[10/28 19:58:27.823513] SUCC: thread[3] progressive mode, completed total inserted rows: 125000, 282730.59 records/second
|
||||||
|
[10/28 19:58:27.823779] SUCC: Spent 0.455783 (real 0.438625) seconds to insert rows: 1000000 with 8 thread(s) into db_sub 2194026.54 (real 2279851.81) records/second
|
||||||
|
[10/28 19:58:27.823786] SUCC: insert delay, min: 0.9780ms, avg: 3.5090ms, p90: 5.5650ms, p95: 6.8600ms, p99: 10.6010ms, max: 13.4400ms
|
||||||
|
[10/28 20:00:06.417182] SUCC: created database (db_sub)
|
||||||
|
[10/28 20:00:06.448202] INFO: start creating 1000 table(s) with 8 thread(s)
|
||||||
|
[10/28 20:00:06.596961] SUCC: Spent 0.1480 seconds to create 1000 table(s) with 8 thread(s) speed: 6757 tables/s, already exist 0 table(s), actual 1000 table(s) pre created, 0 table(s) will be auto created
|
||||||
|
[10/28 20:00:06.895455] SUCC: thread[3] progressive mode, completed total inserted rows: 125000, 443978.76 records/second
|
||||||
|
[10/28 20:00:06.896986] SUCC: thread[5] progressive mode, completed total inserted rows: 125000, 442549.94 records/second
|
||||||
|
[10/28 20:00:06.897536] SUCC: thread[0] progressive mode, completed total inserted rows: 125000, 440927.99 records/second
|
||||||
|
[10/28 20:00:06.898905] SUCC: thread[2] progressive mode, completed total inserted rows: 125000, 439131.15 records/second
|
||||||
|
[10/28 20:00:06.899024] SUCC: thread[7] progressive mode, completed total inserted rows: 125000, 439628.46 records/second
|
||||||
|
[10/28 20:00:06.901861] SUCC: thread[1] progressive mode, completed total inserted rows: 125000, 435197.37 records/second
|
||||||
|
[10/28 20:00:06.902305] SUCC: thread[6] progressive mode, completed total inserted rows: 125000, 434812.86 records/second
|
||||||
|
[10/28 20:00:06.904698] SUCC: thread[4] progressive mode, completed total inserted rows: 125000, 433406.26 records/second
|
||||||
|
[10/28 20:00:06.904905] SUCC: Spent 0.301788 (real 0.284949) seconds to insert rows: 1000000 with 8 thread(s) into db_sub 3313584.37 (real 3509399.93) records/second
|
||||||
|
[10/28 20:00:06.904912] SUCC: insert delay, min: 0.8770ms, avg: 2.2796ms, p90: 3.1340ms, p95: 3.6480ms, p99: 4.8280ms, max: 6.0880ms
|
||||||
|
[10/28 20:05:34.756207] SUCC: created database (db_sub)
|
||||||
|
[10/28 20:05:34.784793] INFO: start creating 1000 table(s) with 8 thread(s)
|
||||||
|
[10/28 20:05:34.927068] SUCC: Spent 0.1430 seconds to create 1000 table(s) with 8 thread(s) speed: 6993 tables/s, already exist 0 table(s), actual 1000 table(s) pre created, 0 table(s) will be auto created
|
||||||
|
[10/28 20:05:35.213741] SUCC: thread[4] progressive mode, completed total inserted rows: 125000, 466952.82 records/second
|
||||||
|
[10/28 20:05:35.215403] SUCC: thread[3] progressive mode, completed total inserted rows: 125000, 463804.68 records/second
|
||||||
|
[10/28 20:05:35.221132] SUCC: thread[2] progressive mode, completed total inserted rows: 125000, 453322.31 records/second
|
||||||
|
[10/28 20:05:35.221224] SUCC: thread[1] progressive mode, completed total inserted rows: 125000, 453671.11 records/second
|
||||||
|
[10/28 20:05:35.222003] SUCC: thread[0] progressive mode, completed total inserted rows: 125000, 452641.07 records/second
|
||||||
|
[10/28 20:05:35.222536] SUCC: thread[5] progressive mode, completed total inserted rows: 125000, 451796.89 records/second
|
||||||
|
[10/28 20:05:35.223663] SUCC: thread[7] progressive mode, completed total inserted rows: 125000, 449643.52 records/second
|
||||||
|
[10/28 20:05:35.225246] SUCC: thread[6] progressive mode, completed total inserted rows: 125000, 447768.68 records/second
|
||||||
|
[10/28 20:05:35.225659] SUCC: Spent 0.290871 (real 0.274808) seconds to insert rows: 1000000 with 8 thread(s) into db_sub 3437950.16 (real 3638904.25) records/second
|
||||||
|
[10/28 20:05:35.225666] SUCC: insert delay, min: 0.9360ms, avg: 2.1985ms, p90: 2.9290ms, p95: 3.4580ms, p99: 4.6030ms, max: 6.2660ms
|
|
@ -0,0 +1,273 @@
|
||||||
|
// sample code to verify all TDengine API
|
||||||
|
// to compile: gcc -o apitest apitest.c -ltaos
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include "taos.h"
|
||||||
|
static int64_t count = 10000;
|
||||||
|
|
||||||
|
int64_t genReqid() {
|
||||||
|
count += 100;
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
void stmtAsyncQueryCb(void* param, TAOS_RES* pRes, int code) {
|
||||||
|
int affected_rows = taos_affected_rows(pRes);
|
||||||
|
return;
|
||||||
|
/*
|
||||||
|
SSP_CB_PARAM* qParam = (SSP_CB_PARAM*)param;
|
||||||
|
if (code == 0 && pRes) {
|
||||||
|
if (qParam->fetch) {
|
||||||
|
taos_fetch_rows_a(pRes, sqAsyncFetchCb, param);
|
||||||
|
} else {
|
||||||
|
if (qParam->free) {
|
||||||
|
taos_free_result(pRes);
|
||||||
|
}
|
||||||
|
*qParam->end = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sqError("select", taos_errstr(pRes));
|
||||||
|
*qParam->end = 1;
|
||||||
|
taos_free_result(pRes);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
void veriry_stmt(TAOS* taos) {
|
||||||
|
TAOS_RES* result = taos_query(taos, "drop database if exists test;");
|
||||||
|
taos_free_result(result);
|
||||||
|
usleep(100000);
|
||||||
|
result = taos_query(taos, "create database test;");
|
||||||
|
|
||||||
|
int code = taos_errno(result);
|
||||||
|
if (code != 0) {
|
||||||
|
printf("\033[31mfailed to create database, reason:%s\033[0m\n", taos_errstr(result));
|
||||||
|
taos_free_result(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
taos_free_result(result);
|
||||||
|
|
||||||
|
usleep(100000);
|
||||||
|
taos_select_db(taos, "test");
|
||||||
|
|
||||||
|
// create table
|
||||||
|
/*
|
||||||
|
const char* sql =
|
||||||
|
"create table m1 (ts timestamp, b bool, v1 tinyint, v2 smallint, v4 int, v8 bigint, f4 float, f8 double, bin "
|
||||||
|
"binary(40), blob nchar(10))";
|
||||||
|
*/
|
||||||
|
const char* sql =
|
||||||
|
"create table m1 (ts timestamp, blob2 nchar(10), blob nchar(10),blob3 nchar(10),blob4 nchar(10),blob5 "
|
||||||
|
"nchar(10))";
|
||||||
|
result = taos_query(taos, sql);
|
||||||
|
code = taos_errno(result);
|
||||||
|
if (code != 0) {
|
||||||
|
printf("\033[31mfailed to create table, reason:%s\033[0m\n", taos_errstr(result));
|
||||||
|
taos_free_result(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
taos_free_result(result);
|
||||||
|
|
||||||
|
// insert 10 records
|
||||||
|
struct {
|
||||||
|
int64_t ts[10];
|
||||||
|
char blob[10][1];
|
||||||
|
char blob2[10][1];
|
||||||
|
char blob3[10][1];
|
||||||
|
char blob4[10][1];
|
||||||
|
char blob5[10][1];
|
||||||
|
|
||||||
|
} v;
|
||||||
|
|
||||||
|
int32_t* t64_len = malloc(sizeof(int32_t) * 10);
|
||||||
|
int32_t* blob_len = malloc(sizeof(int32_t) * 10);
|
||||||
|
int32_t* blob_len2 = malloc(sizeof(int32_t) * 10);
|
||||||
|
int32_t* blob_len3 = malloc(sizeof(int32_t) * 10);
|
||||||
|
int32_t* blob_len4 = malloc(sizeof(int32_t) * 10);
|
||||||
|
int32_t* blob_len5 = malloc(sizeof(int32_t) * 10);
|
||||||
|
|
||||||
|
#include "time.h"
|
||||||
|
clock_t start, end;
|
||||||
|
TAOS_STMT2_OPTION option = {0, true, true, stmtAsyncQueryCb, NULL};
|
||||||
|
|
||||||
|
start = clock();
|
||||||
|
TAOS_STMT2* stmt = taos_stmt2_init(taos, &option);
|
||||||
|
end = clock();
|
||||||
|
printf("init time:%f\n", (double)(end - start) / CLOCKS_PER_SEC);
|
||||||
|
// TAOS_MULTI_BIND params[10];
|
||||||
|
TAOS_STMT2_BIND params[10];
|
||||||
|
char is_null[10] = {0};
|
||||||
|
|
||||||
|
params[0].buffer_type = TSDB_DATA_TYPE_TIMESTAMP;
|
||||||
|
// params[0].buffer_length = sizeof(v.ts[0]);
|
||||||
|
params[0].buffer = v.ts;
|
||||||
|
params[0].length = t64_len;
|
||||||
|
params[0].is_null = is_null;
|
||||||
|
params[0].num = 10;
|
||||||
|
|
||||||
|
params[1].buffer_type = TSDB_DATA_TYPE_NCHAR;
|
||||||
|
// params[8].buffer_length = sizeof(v.blob2[0]);
|
||||||
|
params[1].buffer = v.blob2;
|
||||||
|
params[1].length = blob_len2;
|
||||||
|
params[1].is_null = is_null;
|
||||||
|
params[1].num = 10;
|
||||||
|
|
||||||
|
params[2].buffer_type = TSDB_DATA_TYPE_NCHAR;
|
||||||
|
// params[9].buffer_length = sizeof(v.blob[0]);
|
||||||
|
params[2].buffer = v.blob3;
|
||||||
|
params[2].length = blob_len;
|
||||||
|
params[2].is_null = is_null;
|
||||||
|
params[2].num = 10;
|
||||||
|
|
||||||
|
params[3].buffer_type = TSDB_DATA_TYPE_NCHAR;
|
||||||
|
// params[9].buffer_length = sizeof(v.blob[0]);
|
||||||
|
params[3].buffer = v.blob4;
|
||||||
|
params[3].length = blob_len;
|
||||||
|
params[3].is_null = is_null;
|
||||||
|
params[3].num = 10;
|
||||||
|
|
||||||
|
params[4].buffer_type = TSDB_DATA_TYPE_NCHAR;
|
||||||
|
// params[9].buffer_length = sizeof(v.blob[0]);
|
||||||
|
params[4].buffer = v.blob;
|
||||||
|
params[4].length = blob_len;
|
||||||
|
params[4].is_null = is_null;
|
||||||
|
params[4].num = 10;
|
||||||
|
|
||||||
|
params[5].buffer_type = TSDB_DATA_TYPE_NCHAR;
|
||||||
|
// params[9].buffer_length = sizeof(v.blob[0]);
|
||||||
|
params[5].buffer = v.blob5;
|
||||||
|
params[5].length = blob_len;
|
||||||
|
params[5].is_null = is_null;
|
||||||
|
params[5].num = 10;
|
||||||
|
|
||||||
|
sql = "insert into ? (ts, blob2, blob, blob3, blob4, blob5) values(?,?,?,?,?,?)";
|
||||||
|
start = clock();
|
||||||
|
code = taos_stmt2_prepare(stmt, sql, 0);
|
||||||
|
end = clock();
|
||||||
|
printf("prepare time:%f\n", (double)(end - start) / CLOCKS_PER_SEC);
|
||||||
|
if (code != 0) {
|
||||||
|
printf("\033[31mfailed to execute taos_stmt_prepare. error:%s\033[0m\n", taos_stmt_errstr(stmt));
|
||||||
|
taos_stmt_close(stmt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
code = taos_stmt_set_tbname(stmt, "m1");
|
||||||
|
if (code != 0) {
|
||||||
|
printf("\033[31mfailed to execute taos_stmt_prepare. error:%s\033[0m\n", taos_stmt_errstr(stmt));
|
||||||
|
taos_stmt_close(stmt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
int64_t ts = 1591060628000;
|
||||||
|
for (int i = 0; i < 10; ++i) {
|
||||||
|
is_null[i] = 0;
|
||||||
|
|
||||||
|
v.ts[i] = ts++;
|
||||||
|
|
||||||
|
v.blob[i][0] = 'a' + i;
|
||||||
|
v.blob2[i][0] = 'f' + i;
|
||||||
|
v.blob3[i][0] = 't' + i;
|
||||||
|
v.blob4[i][0] = 'A' + i;
|
||||||
|
v.blob5[i][0] = 'G' + i;
|
||||||
|
|
||||||
|
// v.blob2[i] = malloc(strlen("一二三四五六七十九八"));
|
||||||
|
// v.blob[i] = malloc(strlen("十九八七六五四三二一"));
|
||||||
|
|
||||||
|
// strcpy(v.blob2[i], "一二三四五六七十九八");
|
||||||
|
// strcpy(v.blob[i], "十九八七六五四三二一");
|
||||||
|
|
||||||
|
blob_len[i] = sizeof(char);
|
||||||
|
blob_len2[i] = sizeof(char);
|
||||||
|
blob_len3[i] = sizeof(char);
|
||||||
|
blob_len4[i] = sizeof(char);
|
||||||
|
blob_len5[i] = sizeof(char);
|
||||||
|
}
|
||||||
|
|
||||||
|
char* tbname = "m1";
|
||||||
|
TAOS_STMT2_BIND* bind_cols[1] = {¶ms[0]};
|
||||||
|
TAOS_STMT2_BINDV bindv = {1, &tbname, NULL, &bind_cols[0]};
|
||||||
|
start = clock();
|
||||||
|
// taos_stmt2_bind_param(stmt, "m1", NULL, params, -1);
|
||||||
|
taos_stmt2_bind_param(stmt, &bindv, -1);
|
||||||
|
end = clock();
|
||||||
|
printf("bind time:%f\n", (double)(end - start) / CLOCKS_PER_SEC);
|
||||||
|
// taos_stmt_bind_param_batch(stmt, params);
|
||||||
|
// taos_stmt_add_batch(stmt);
|
||||||
|
/*
|
||||||
|
int param_count = -1;
|
||||||
|
code = taos_stmt2_param_count(stmt, ¶m_count);
|
||||||
|
if (code != 0) {
|
||||||
|
printf("\033[31mfailed to execute taos_stmt_param_count. error:%s\033[0m\n", taos_stmt_errstr(stmt));
|
||||||
|
taos_stmt_close(stmt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
printf("param_count: %d\n", param_count);
|
||||||
|
*/
|
||||||
|
TAOS_FIELD_E* fields = NULL;
|
||||||
|
int field_count = -1;
|
||||||
|
start = clock();
|
||||||
|
code = taos_stmt2_get_fields(stmt, TAOS_FIELD_COL, &field_count, NULL);
|
||||||
|
end = clock();
|
||||||
|
printf("get fields time:%f\n", (double)(end - start) / CLOCKS_PER_SEC);
|
||||||
|
if (code != 0) {
|
||||||
|
printf("\033[31mfailed to execute taos_stmt_param_count. error:%s\033[0m\n", taos_stmt_errstr(stmt));
|
||||||
|
taos_stmt_close(stmt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
printf("col field_count: %d\n", field_count);
|
||||||
|
start = clock();
|
||||||
|
taos_stmt2_free_fields(stmt, fields);
|
||||||
|
end = clock();
|
||||||
|
printf("free time:%f\n", (double)(end - start) / CLOCKS_PER_SEC);
|
||||||
|
/*
|
||||||
|
code = taos_stmt2_get_fields(stmt, TAOS_FIELD_TAG, &field_count, &fields);
|
||||||
|
if (code != 0) {
|
||||||
|
printf("\033[31mfailed to execute taos_stmt_param_count. error:%s\033[0m\n", taos_stmt_errstr(stmt));
|
||||||
|
taos_stmt_close(stmt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
printf("tag field_count: %d\n", field_count);
|
||||||
|
taos_stmt2_free_fields(stmt, fields);
|
||||||
|
*/
|
||||||
|
// if (taos_stmt_execute(stmt) != 0) {
|
||||||
|
start = clock();
|
||||||
|
// if (taos_stmt2_exec(stmt, NULL, stmtAsyncQueryCb, NULL) != 0) {
|
||||||
|
if (taos_stmt2_exec(stmt, NULL) != 0) {
|
||||||
|
printf("\033[31mfailed to execute insert statement.error:%s\033[0m\n", taos_stmt_errstr(stmt));
|
||||||
|
taos_stmt2_close(stmt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
end = clock();
|
||||||
|
printf("exec time:%f\n", (double)(end - start) / CLOCKS_PER_SEC);
|
||||||
|
|
||||||
|
taos_stmt2_close(stmt);
|
||||||
|
|
||||||
|
free(blob_len);
|
||||||
|
free(blob_len2);
|
||||||
|
free(blob_len5);
|
||||||
|
free(blob_len3);
|
||||||
|
free(blob_len4);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char* argv[]) {
|
||||||
|
const char* host = "127.0.0.1";
|
||||||
|
const char* user = "root";
|
||||||
|
const char* passwd = "taosdata";
|
||||||
|
|
||||||
|
taos_options(TSDB_OPTION_TIMEZONE, "GMT-8");
|
||||||
|
TAOS* taos = taos_connect(host, user, passwd, "", 0);
|
||||||
|
if (taos == NULL) {
|
||||||
|
printf("\033[31mfailed to connect to db, reason:%s\033[0m\n", taos_errstr(taos));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("********* verify stmt query **********\n");
|
||||||
|
veriry_stmt(taos);
|
||||||
|
|
||||||
|
printf("done\n");
|
||||||
|
taos_close(taos);
|
||||||
|
taos_cleanup();
|
||||||
|
}
|
|
@ -81,8 +81,8 @@ void veriry_stmt(TAOS* taos) {
|
||||||
float f4[10];
|
float f4[10];
|
||||||
double f8[10];
|
double f8[10];
|
||||||
char bin[10][40];
|
char bin[10][40];
|
||||||
char blob[10][80];
|
char blob[10][1];
|
||||||
char blob2[10][80];
|
char blob2[10][1];
|
||||||
} v;
|
} v;
|
||||||
|
|
||||||
int32_t* t8_len = malloc(sizeof(int32_t) * 10);
|
int32_t* t8_len = malloc(sizeof(int32_t) * 10);
|
||||||
|
@ -218,8 +218,14 @@ void veriry_stmt(TAOS* taos) {
|
||||||
for (int j = 0; j < sizeof(v.bin[0]); ++j) {
|
for (int j = 0; j < sizeof(v.bin[0]); ++j) {
|
||||||
v.bin[i][j] = (char)(i + '0');
|
v.bin[i][j] = (char)(i + '0');
|
||||||
}
|
}
|
||||||
strcpy(v.blob2[i], "一二三四五六七十九八");
|
v.blob[i][0] = 'a' + i;
|
||||||
strcpy(v.blob[i], "一二三四五六七八九十");
|
v.blob2[i][0] = 'A' + i;
|
||||||
|
|
||||||
|
// v.blob2[i] = malloc(strlen("一二三四五六七十九八"));
|
||||||
|
// v.blob[i] = malloc(strlen("十九八七六五四三二一"));
|
||||||
|
|
||||||
|
// strcpy(v.blob2[i], "一二三四五六七十九八");
|
||||||
|
// strcpy(v.blob[i], "十九八七六五四三二一");
|
||||||
|
|
||||||
t8_len[i] = sizeof(int8_t);
|
t8_len[i] = sizeof(int8_t);
|
||||||
t16_len[i] = sizeof(int16_t);
|
t16_len[i] = sizeof(int16_t);
|
||||||
|
@ -228,10 +234,9 @@ void veriry_stmt(TAOS* taos) {
|
||||||
float_len[i] = sizeof(float);
|
float_len[i] = sizeof(float);
|
||||||
double_len[i] = sizeof(double);
|
double_len[i] = sizeof(double);
|
||||||
bin_len[i] = sizeof(v.bin[0]);
|
bin_len[i] = sizeof(v.bin[0]);
|
||||||
blob_len[i] = (int32_t)strlen(v.blob[i]);
|
blob_len[i] = sizeof(char);
|
||||||
blob_len2[i] = (int32_t)strlen(v.blob2[i]);
|
blob_len2[i] = sizeof(char);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* tbname = "m1";
|
char* tbname = "m1";
|
||||||
TAOS_STMT2_BIND* bind_cols[1] = {¶ms[0]};
|
TAOS_STMT2_BIND* bind_cols[1] = {¶ms[0]};
|
||||||
TAOS_STMT2_BINDV bindv = {1, &tbname, NULL, &bind_cols[0]};
|
TAOS_STMT2_BINDV bindv = {1, &tbname, NULL, &bind_cols[0]};
|
||||||
|
|
|
@ -16,7 +16,7 @@ aux_source_directory(src OS_SRC)
|
||||||
|
|
||||||
# taoscTest
|
# taoscTest
|
||||||
add_executable(taoscTest "taoscTest.cpp")
|
add_executable(taoscTest "taoscTest.cpp")
|
||||||
target_link_libraries(taoscTest taos os gtest_main)
|
target_link_libraries(taoscTest ${TAOS_LIB} os gtest_main)
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
taoscTest
|
taoscTest
|
||||||
PUBLIC "${TD_SOURCE_DIR}/include/os"
|
PUBLIC "${TD_SOURCE_DIR}/include/os"
|
||||||
|
|
|
@ -13,7 +13,7 @@ IF(TD_WEBSOCKET)
|
||||||
PREFIX "taosws-rs"
|
PREFIX "taosws-rs"
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosws-rs
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosws-rs
|
||||||
BUILD_ALWAYS off
|
BUILD_ALWAYS off
|
||||||
DEPENDS taos
|
DEPENDS ${TAOS_LIB}
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND cmake -E echo "taosws-rs no need cmake to config"
|
CONFIGURE_COMMAND cmake -E echo "taosws-rs no need cmake to config"
|
||||||
PATCH_COMMAND
|
PATCH_COMMAND
|
||||||
|
@ -32,7 +32,7 @@ IF(TD_WEBSOCKET)
|
||||||
PREFIX "taosws-rs"
|
PREFIX "taosws-rs"
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosws-rs
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosws-rs
|
||||||
BUILD_ALWAYS off
|
BUILD_ALWAYS off
|
||||||
DEPENDS taos
|
DEPENDS ${TAOS_LIB}
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND cmake -E echo "taosws-rs no need cmake to config"
|
CONFIGURE_COMMAND cmake -E echo "taosws-rs no need cmake to config"
|
||||||
PATCH_COMMAND
|
PATCH_COMMAND
|
||||||
|
@ -52,7 +52,7 @@ IF(TD_WEBSOCKET)
|
||||||
PREFIX "taosws-rs"
|
PREFIX "taosws-rs"
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosws-rs
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosws-rs
|
||||||
BUILD_ALWAYS off
|
BUILD_ALWAYS off
|
||||||
DEPENDS taos
|
DEPENDS ${TAOS_LIB}
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND cmake -E echo "taosws-rs no need cmake to config"
|
CONFIGURE_COMMAND cmake -E echo "taosws-rs no need cmake to config"
|
||||||
PATCH_COMMAND
|
PATCH_COMMAND
|
||||||
|
@ -139,7 +139,7 @@ ELSE()
|
||||||
PREFIX "taosadapter"
|
PREFIX "taosadapter"
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosadapter
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosadapter
|
||||||
BUILD_ALWAYS off
|
BUILD_ALWAYS off
|
||||||
DEPENDS taos
|
DEPENDS ${TAOS_LIB}
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND cmake -E echo "taosadapter no need cmake to config"
|
CONFIGURE_COMMAND cmake -E echo "taosadapter no need cmake to config"
|
||||||
PATCH_COMMAND
|
PATCH_COMMAND
|
||||||
|
@ -168,7 +168,7 @@ ELSE()
|
||||||
PREFIX "taosadapter"
|
PREFIX "taosadapter"
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosadapter
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosadapter
|
||||||
BUILD_ALWAYS off
|
BUILD_ALWAYS off
|
||||||
DEPENDS taos
|
DEPENDS ${TAOS_LIB}
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND cmake -E echo "taosadapter no need cmake to config"
|
CONFIGURE_COMMAND cmake -E echo "taosadapter no need cmake to config"
|
||||||
PATCH_COMMAND
|
PATCH_COMMAND
|
||||||
|
@ -193,7 +193,7 @@ ELSE()
|
||||||
PREFIX "taosadapter"
|
PREFIX "taosadapter"
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosadapter
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosadapter
|
||||||
BUILD_ALWAYS off
|
BUILD_ALWAYS off
|
||||||
DEPENDS taos
|
DEPENDS ${TAOS_LIB}
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND cmake -E echo "taosadapter no need cmake to config"
|
CONFIGURE_COMMAND cmake -E echo "taosadapter no need cmake to config"
|
||||||
PATCH_COMMAND
|
PATCH_COMMAND
|
||||||
|
|
|
@ -33,9 +33,9 @@ ELSE()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
if(TD_WINDOWS)
|
if(TD_WINDOWS)
|
||||||
target_link_libraries(shell PUBLIC taos_static ${LINK_WEBSOCKET})
|
target_link_libraries(shell PUBLIC ${TAOS_LIB_STATIC} ${LINK_WEBSOCKET})
|
||||||
else()
|
else()
|
||||||
target_link_libraries(shell PUBLIC taos ${LINK_WEBSOCKET} ${LINK_JEMALLOC} ${LINK_ARGP})
|
target_link_libraries(shell PUBLIC ${TAOS_LIB} ${LINK_WEBSOCKET} ${LINK_JEMALLOC} ${LINK_ARGP})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
|
@ -63,7 +63,7 @@ IF(TD_LINUX)
|
||||||
IF(TD_WEBSOCKET)
|
IF(TD_WEBSOCKET)
|
||||||
ADD_DEPENDENCIES(shell_ut taosws-rs)
|
ADD_DEPENDENCIES(shell_ut taosws-rs)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
target_link_libraries(shell_ut PUBLIC taos ${LINK_WEBSOCKET} ${LINK_JEMALLOC} ${LINK_ARGP})
|
target_link_libraries(shell_ut PUBLIC ${TAOS_LIB} ${LINK_WEBSOCKET} ${LINK_JEMALLOC} ${LINK_ARGP})
|
||||||
target_link_libraries(shell_ut PRIVATE os common transport geometry util)
|
target_link_libraries(shell_ut PRIVATE os common transport geometry util)
|
||||||
|
|
||||||
# util depends
|
# util depends
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
add_executable(tmq_demo tmqDemo.c)
|
add_executable(tmq_demo tmqDemo.c)
|
||||||
add_dependencies(tmq_demo taos)
|
add_dependencies(tmq_demo ${TAOS_LIB})
|
||||||
add_executable(tmq_sim tmqSim.c)
|
add_executable(tmq_sim tmqSim.c)
|
||||||
add_executable(create_table createTable.c)
|
add_executable(create_table createTable.c)
|
||||||
add_executable(tmq_taosx_ci tmq_taosx_ci.c)
|
add_executable(tmq_taosx_ci tmq_taosx_ci.c)
|
||||||
|
@ -22,7 +22,7 @@ endif(${TD_LINUX})
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
tmq_offset
|
tmq_offset
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
@ -30,7 +30,7 @@ target_link_libraries(
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
tmq_multi_thread_test
|
tmq_multi_thread_test
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
@ -38,56 +38,56 @@ target_link_libraries(
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
create_table
|
create_table
|
||||||
PUBLIC taos
|
|
||||||
PUBLIC util
|
|
||||||
PUBLIC common
|
|
||||||
PUBLIC os
|
|
||||||
)
|
|
||||||
target_link_libraries(
|
|
||||||
tmq_demo
|
|
||||||
PUBLIC taos
|
|
||||||
PUBLIC util
|
|
||||||
PUBLIC common
|
|
||||||
PUBLIC os
|
|
||||||
)
|
|
||||||
target_link_libraries(
|
|
||||||
tmq_sim
|
|
||||||
PUBLIC ${TAOS_LIB}
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
)
|
)
|
||||||
|
target_link_libraries(
|
||||||
|
tmq_demo
|
||||||
|
PUBLIC ${TAOS_LIB}
|
||||||
|
PUBLIC util
|
||||||
|
PUBLIC common
|
||||||
|
PUBLIC os
|
||||||
|
)
|
||||||
|
target_link_libraries(
|
||||||
|
tmq_sim
|
||||||
|
PUBLIC ${TAOS_LIB_PLATFORM_SPEC}
|
||||||
|
PUBLIC util
|
||||||
|
PUBLIC common
|
||||||
|
PUBLIC os
|
||||||
|
)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
tmq_ts5466
|
tmq_ts5466
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
)
|
)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
tmq_td32187
|
tmq_td32187
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
)
|
)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
tmq_td32526
|
tmq_td32526
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
)
|
)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
tmq_taosx_ci
|
tmq_taosx_ci
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
)
|
)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
tmq_offset_test
|
tmq_offset_test
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
@ -95,7 +95,7 @@ target_link_libraries(
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
replay_test
|
replay_test
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
@ -103,7 +103,7 @@ target_link_libraries(
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
write_raw_block_test
|
write_raw_block_test
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
@ -111,7 +111,7 @@ target_link_libraries(
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
tmq_write_raw_test
|
tmq_write_raw_test
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
@ -119,7 +119,7 @@ target_link_libraries(
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
sml_test
|
sml_test
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
@ -128,7 +128,7 @@ target_link_libraries(
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
get_db_name_test
|
get_db_name_test
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
@ -136,7 +136,7 @@ target_link_libraries(
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
varbinary_test
|
varbinary_test
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
@ -145,7 +145,7 @@ target_link_libraries(
|
||||||
if(${TD_LINUX})
|
if(${TD_LINUX})
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
tsz_test
|
tsz_test
|
||||||
PUBLIC taos
|
PUBLIC ${TAOS_LIB}
|
||||||
PUBLIC util
|
PUBLIC util
|
||||||
PUBLIC common
|
PUBLIC common
|
||||||
PUBLIC os
|
PUBLIC os
|
||||||
|
|
Loading…
Reference in New Issue