Merge pull request #10290 from taosdata/feature/tq
use full name to create topic
This commit is contained in:
commit
2b38bed150
|
@ -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, dbName, T_NAME_ACCT | T_NAME_DB);
|
||||||
tNameFromString(&name, topicName, T_NAME_TABLE);
|
tNameFromString(&name, topicName, T_NAME_TABLE);
|
||||||
|
|
||||||
char topicFname[TSDB_TOPIC_FNAME_LEN] = {0};
|
|
||||||
tNameExtractFullName(&name, topicFname);
|
|
||||||
|
|
||||||
SMCreateTopicReq req = {
|
SMCreateTopicReq req = {
|
||||||
.igExists = 1,
|
.igExists = 1,
|
||||||
.physicalPlan = (char*)pStr,
|
.physicalPlan = (char*)pStr,
|
||||||
.sql = (char*)sql,
|
.sql = (char*)sql,
|
||||||
.logicalPlan = (char*)"no logic plan",
|
.logicalPlan = (char*)"no logic plan",
|
||||||
};
|
};
|
||||||
memcpy(req.name, topicName, TSDB_TOPIC_FNAME_LEN);
|
tNameExtractFullName(&name, req.name);
|
||||||
|
|
||||||
int tlen = tSerializeMCreateTopicReq(NULL, 0, &req);
|
int tlen = tSerializeMCreateTopicReq(NULL, 0, &req);
|
||||||
void* buf = malloc(tlen);
|
void* buf = malloc(tlen);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "mndVgroup.h"
|
#include "mndVgroup.h"
|
||||||
#include "tname.h"
|
#include "tname.h"
|
||||||
|
|
||||||
#define MND_TOPIC_VER_NUMBER 1
|
#define MND_TOPIC_VER_NUMBER 1
|
||||||
#define MND_TOPIC_RESERVE_SIZE 64
|
#define MND_TOPIC_RESERVE_SIZE 64
|
||||||
|
|
||||||
static int32_t mndTopicActionInsert(SSdb *pSdb, SMqTopicObj *pTopic);
|
static int32_t mndTopicActionInsert(SSdb *pSdb, SMqTopicObj *pTopic);
|
||||||
|
|
Loading…
Reference in New Issue