From cefd65f69ebda7c21e8776bc0d3187a02b27ce8d Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 8 Jul 2022 18:51:51 +0800 Subject: [PATCH] feat:write meta from tmq to taosd --- examples/c/tmq.c | 4 ++-- source/client/src/tmq.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/c/tmq.c b/examples/c/tmq.c index 9aa301b020..07af30ab72 100644 --- a/examples/c/tmq.c +++ b/examples/c/tmq.c @@ -30,7 +30,7 @@ static void msg_process(TAOS_RES* msg) { if (tmq_get_res_type(msg) == TMQ_RES_TABLE_META) { tmq_raw_data *raw = tmq_get_raw_meta(msg); if(raw){ - TAOS* pConn = taos_connect("localhost", "root", "taosdata", "abc1", 0); + TAOS* pConn = taos_connect("192.168.1.86", "root", "taosdata", "abc1", 0); if (pConn == NULL) { return; } @@ -68,7 +68,7 @@ int32_t init_env() { return -1; } - TAOS_RES* pRes = taos_query(pConn, "create database if not exists abc1 vgroups 3"); + TAOS_RES* pRes = taos_query(pConn, "create database if not exists abc1 vgroups 1"); if (taos_errno(pRes) != 0) { printf("error in create db, reason:%s\n", taos_errstr(pRes)); return -1; diff --git a/source/client/src/tmq.c b/source/client/src/tmq.c index a2de9f88da..6fcb9c1573 100644 --- a/source/client/src/tmq.c +++ b/source/client/src/tmq.c @@ -2312,7 +2312,7 @@ static int32_t taosCreateStb(TAOS *taos, void *meta, int32_t metaLen){ pReq.source = 1; SName tableName; - tNameExtractFullName(toName(pTscObj->acctId, pRequest->pDb, "rname", &tableName), pReq.name); + tNameExtractFullName(toName(pTscObj->acctId, pRequest->pDb, req.name, &tableName), pReq.name); SCmdMsgInfo pCmdMsg = {0}; pCmdMsg.epSet = getEpSet_s(&pTscObj->pAppInfo->mgmtEp);