diff --git a/source/client/src/tmq.c b/source/client/src/tmq.c index f8d9cfe44b018f1c40cc4b9ba306e9e843fbe896..419d6294a760f411039e111c990a5bc8fc48058a 100644 --- a/source/client/src/tmq.c +++ b/source/client/src/tmq.c @@ -384,16 +384,13 @@ TAOS_RES* tmq_create_topic(TAOS* taos, const char* topicName, const char* sql, i tNameFromString(&name, dbName, T_NAME_ACCT | T_NAME_DB); tNameFromString(&name, topicName, T_NAME_TABLE); - char topicFname[TSDB_TOPIC_FNAME_LEN] = {0}; - tNameExtractFullName(&name, topicFname); - SMCreateTopicReq req = { .igExists = 1, .physicalPlan = (char*)pStr, .sql = (char*)sql, .logicalPlan = (char*)"no logic plan", }; - memcpy(req.name, topicName, TSDB_TOPIC_FNAME_LEN); + tNameExtractFullName(&name, req.name); int tlen = tSerializeMCreateTopicReq(NULL, 0, &req); void* buf = malloc(tlen); diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index e7308b833e9c27ca568bfc4b97e5480dafc8f0e0..deac89d68aa1d45d673cb78f7e249c3c9071b6d6 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -26,7 +26,7 @@ #include "mndVgroup.h" #include "tname.h" -#define MND_TOPIC_VER_NUMBER 1 +#define MND_TOPIC_VER_NUMBER 1 #define MND_TOPIC_RESERVE_SIZE 64 static int32_t mndTopicActionInsert(SSdb *pSdb, SMqTopicObj *pTopic);