diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 3f35c90134cdeef92fc568486dd4d00544e5e454..b984f3a1173f3c1cd8d1a9c61bb36816e4f20ec7 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -605,10 +605,10 @@ static int32_t retrieveTableMeta(TAOS* taos, char* tableName, STableMeta** pTabl char fullTableName[TSDB_TABLE_FNAME_LEN] = {0}; memset(fullTableName, 0, tListLen(fullTableName)); tNameExtractFullName(&sname, fullTableName); - tscFreeRegisteredSqlObj(pSql); size_t size = 0; taosHashGetCloneExt(UTIL_GET_TABLEMETA(pSql), fullTableName, strlen(fullTableName), NULL, (void**)&tableMeta, &size); + tscFreeRegisteredSqlObj(pSql); } if (tableMeta != NULL) { diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index e3e50e58f88e8406ed1ab5aa9bb63346a9a34e52..2c8ef9b764a0aa2bbf8dd9304776175a8a599a27 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -257,6 +257,7 @@ static void asyncConnCallback(void *param, TAOS_RES *tres, int code) { SSqlObj *pSql = (SSqlObj *) tres; assert(pSql != NULL); + pSql->pTscObj->pClusterInfo = (SClusterInfo *)tscAcquireClusterInfo(pSql->pTscObj->clusterId); pSql->fetchFp(pSql->param, tres, code); } @@ -269,7 +270,6 @@ TAOS *taos_connect_a(char *ip, char *user, char *pass, char *db, uint16_t port, } if (taos) *taos = pObj; - pSql->fetchFp = fp; pSql->res.code = tscBuildAndSendRequest(pSql, NULL); tscDebug("%p DB async connection is opening", taos);