diff --git a/examples/c/tmq_taosx.c b/examples/c/tmq_taosx.c index 3e116acbf0923296dd0cde9b73fd479f10d5b377..e3c7611fd56e2b0d4c6171fd18671f4a11d66ace 100644 --- a/examples/c/tmq_taosx.c +++ b/examples/c/tmq_taosx.c @@ -23,7 +23,7 @@ static int running = 1; static TAOS* use_db(){ - TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); + TAOS* pConn = taos_connect("192.168.1.86", "root", "taosdata", NULL, 0); if (pConn == NULL) { return NULL; } diff --git a/source/client/src/taosx.c b/source/client/src/taosx.c index 3e61423e08a36981e7eef15f18822a5c94a7d270..02c3b568b11032c261ac3e600f99944e7679379f 100644 --- a/source/client/src/taosx.c +++ b/source/client/src/taosx.c @@ -768,10 +768,11 @@ static int32_t taosCreateTable(TAOS* taos, void* meta, int32_t metaLen) { // change tag cid to new cid if(pCreateReq->type == TSDB_CHILD_TABLE){ STableMeta* pTableMeta = NULL; - code = catalogGetTableMeta(pCatalog, &conn, &pName, &pTableMeta); - if (code != TSDB_CODE_SUCCESS) { - uError("taosCreateTable:catalogGetTableMeta failed. table name: %s", pCreateReq->name); - taosMemoryFreeClear(pTableMeta); + SName sName = {0}; + toName(pTscObj->acctId, pRequest->pDb, pCreateReq->ctb.name, &sName); + code = catalogGetTableMeta(pCatalog, &conn, &sName, &pTableMeta); + if(code != TSDB_CODE_SUCCESS){ + uError("taosCreateTable:catalogGetTableMeta failed. table name: %s", pCreateReq->ctb.name); goto end; }