diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 06121b7923d84b7d74705e8f7d96c8c2b3ef4ca4..bbe2fa8d3a50516a884b5404affab3f53bc5d430 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -705,8 +705,10 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) { } // current data are exhausted, fetch more data - if (pRes->data == NULL || (pRes->data != NULL && pRes->row >= pRes->numOfRows && pCmd->command == TSDB_SQL_RETRIEVE)) { + if (pRes->data == NULL || (pRes->data != NULL && pRes->row >= pRes->numOfRows && + (pCmd->command == TSDB_SQL_RETRIEVE || pCmd->command == TSDB_SQL_RETRIEVE_METRIC || pCmd->command == TSDB_SQL_FETCH))) { taos_fetch_rows_a(res, asyncFetchCallback, pSql->pTscObj); + sem_wait(&pSql->rspSem); } diff --git a/src/query/src/tscAst.c b/src/query/src/tscAst.c index 7be583a5ea1c59bae4065185e39e22b2d0d75dd1..ef83083a2c5aa91fdbbb4db5bbe8330ae188d594 100644 --- a/src/query/src/tscAst.c +++ b/src/query/src/tscAst.c @@ -14,7 +14,6 @@ */ #include "os.h" -#include "sskiplist.h" #include "taosdef.h" #include "taosmsg.h" #include "tast.h" diff --git a/tests/examples/c/CMakeLists.txt b/tests/examples/c/CMakeLists.txt index 287fca7d410b88d240642a57ec194b3d0c686975..81d912fc00d9d543cbee9835ef6c791b1b67542f 100644 --- a/tests/examples/c/CMakeLists.txt +++ b/tests/examples/c/CMakeLists.txt @@ -1,13 +1,13 @@ PROJECT(TDengine) IF (TD_WINDOWS_64) - INCLUDE_DIRECTORIES(${TD_ROOT_DIR}/deps/pthread) + INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/pthread) ENDIF () -INCLUDE_DIRECTORIES(. ${TD_ROOT_DIR}/src/inc ${TD_ROOT_DIR}/src/client/inc ${TD_OS_DIR}/inc) +INCLUDE_DIRECTORIES(. ${TD_COMMUNITY_DIR}/src/inc ${TD_COMMUNITY_DIR}/src/client/inc ${TD_COMMUNITY_DIR}/inc) AUX_SOURCE_DIRECTORY(. SRC) -#ADD_EXECUTABLE(demo ${SRC}) -#TARGET_LINK_LIBRARIES(demo taos_static trpc tutil pthread ) +ADD_EXECUTABLE(demo demo.c) +TARGET_LINK_LIBRARIES(demo taos_static trpc tutil pthread )