fix(tmq): topic name should be lower unless quoted
This commit is contained in:
parent
670b8c926b
commit
7542fa0b62
|
@ -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;
|
||||
char* topic = strdup(src);
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue