fix(tmq): topic name should be lower unless quoted

This commit is contained in:
Liu Jicong 2022-07-18 16:42:54 +08:00
parent 670b8c926b
commit 7542fa0b62
2 changed files with 6 additions and 2 deletions

View File

@ -363,7 +363,11 @@ tmq_list_t* tmq_list_new() {
int32_t tmq_list_append(tmq_list_t* list, const char* src) {
SArray* container = &list->container;
if (src == NULL || src[0] == 0) return -1;
char* topic = strdup(src);
if (topic[0] != '`') {
strtolower(topic, src);
}
if (taosArrayPush(container, &topic) == NULL) return -1;
return 0;
}

View File

@ -243,7 +243,7 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver)
void* data = taosMemoryMalloc(msgLen);
if (data == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
qError("failed to copy data for stream since out of memory");
tqError("failed to copy data for stream since out of memory");
return -1;
}
memcpy(data, msg, msgLen);