diff --git a/include/client/taos.h b/include/client/taos.h index f62abeb045..eb3332ed18 100644 --- a/include/client/taos.h +++ b/include/client/taos.h @@ -153,7 +153,7 @@ DLL_EXPORT int taos_stmt_close(TAOS_STMT *stmt); DLL_EXPORT char * taos_stmt_errstr(TAOS_STMT *stmt); DLL_EXPORT TAOS_RES *taos_query(TAOS *taos, const char *sql); -DLL_EXPORT TAOS_RES *taos_query_l(TAOS *taos, const char *sql, size_t sqlLen); +DLL_EXPORT TAOS_RES *taos_query_l(TAOS *taos, const char *sql, int sqlLen); DLL_EXPORT TAOS_ROW taos_fetch_row(TAOS_RES *res); DLL_EXPORT int taos_result_precision(TAOS_RES *res); // get the time precision of result diff --git a/source/client/CMakeLists.txt b/source/client/CMakeLists.txt index b11146a03f..61b60e5ba6 100644 --- a/source/client/CMakeLists.txt +++ b/source/client/CMakeLists.txt @@ -9,7 +9,7 @@ target_link_libraries( taos PRIVATE common INTERFACE api - PRIVATE os util common transport parser catalog function + PRIVATE os util common transport parser catalog function query ) ADD_SUBDIRECTORY(test) \ No newline at end of file diff --git a/source/client/inc/clientInt.h b/source/client/inc/clientInt.h index b7cdc5d3d3..87951d7944 100644 --- a/source/client/inc/clientInt.h +++ b/source/client/inc/clientInt.h @@ -149,7 +149,7 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet); void initMsgHandleFp(); TAOS *taos_connect_internal(const char *ip, const char *user, const char *pass, const char *auth, const char *db, uint16_t port); -TAOS_RES *taos_query_l(TAOS *taos, const char *sql, size_t sqlLen); +TAOS_RES *taos_query_l(TAOS *taos, const char *sql, int sqlLen); void* doFetchRow(SRequestObj* pRequest); diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index de7fc78c4a..fb98a7da46 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -112,7 +112,7 @@ TAOS *taos_connect_internal(const char *ip, const char *user, const char *pass, return taosConnectImpl(ip, user, &secretEncrypt[0], db, port, NULL, NULL, pInst); } -TAOS_RES *taos_query_l(TAOS *taos, const char *sql, size_t sqlLen) { +TAOS_RES *taos_query_l(TAOS *taos, const char *sql, int sqlLen) { STscObj *pTscObj = (STscObj *)taos; if (sqlLen > (size_t) tsMaxSQLStringLen) { tscError("sql string exceeds max length:%d", tsMaxSQLStringLen); diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index 6501aff21c..d860d56f75 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -3184,7 +3184,7 @@ STableMeta* createTableMetaFromMsg(STableMetaMsg* pTableMetaMsg) { STableMeta* pTableMeta = calloc(1, sizeof(STableMeta) + schemaSize); pTableMeta->tableType = pTableMetaMsg->tableType; - pTableMeta->vgId = pTableMetaMsg->vgroup.vgId; + pTableMeta->vgId = pTableMetaMsg->vgId; pTableMeta->suid = pTableMetaMsg->suid; pTableMeta->uid = pTableMetaMsg->tuid;