diff --git a/source/client/inc/clientSml.h b/source/client/inc/clientSml.h index bce4ef8a0d..3dcba673bf 100644 --- a/source/client/inc/clientSml.h +++ b/source/client/inc/clientSml.h @@ -229,7 +229,7 @@ SSmlTableInfo* smlBuildTableInfo(int numRows, const char* measure, int32_t me SSmlSTableMeta* smlBuildSTableMeta(bool isDataFormat); int32_t smlSetCTableName(SSmlTableInfo *oneTable); STableMeta* smlGetMeta(SSmlHandle *info, const void* measure, int32_t measureLen); -int32_t is_same_child_table_telnet(const void *a, const void *b, size_t len); +int32_t is_same_child_table_telnet(const void *a, const void *b); int64_t smlParseOpenTsdbTime(SSmlHandle *info, const char *data, int32_t len); int32_t smlClearForRerun(SSmlHandle *info); int32_t smlParseValue(SSmlKv *pVal, SSmlMsgBuf *msg); diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 52a68943bd..e0d3a4d61a 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1323,7 +1323,6 @@ int32_t smlClearForRerun(SSmlHandle *info) { static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char *rawLineEnd, int numLines) { int32_t code = TSDB_CODE_SUCCESS; if (info->protocol == TSDB_SML_JSON_PROTOCOL) { - taosHashSetEqualFp(info->childTables, is_same_child_table_telnet); if (lines) { code = smlParseJSON(info, *lines); } else if (rawLine) { @@ -1368,7 +1367,6 @@ static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char code = smlParseInfluxString(info, tmp, tmp + len, info->lines + i); } } else if (info->protocol == TSDB_SML_TELNET_PROTOCOL) { - taosHashSetEqualFp(info->childTables, is_same_child_table_telnet); if (info->dataFormat) { SSmlLineInfo element = {0}; code = smlParseTelnetString(info, (char *)tmp, (char *)tmp + len, &element); diff --git a/source/client/src/clientSmlJson.c b/source/client/src/clientSmlJson.c index b1a412db4e..c6acdc5b91 100644 --- a/source/client/src/clientSmlJson.c +++ b/source/client/src/clientSmlJson.c @@ -1010,7 +1010,7 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo bool needFree = info->dataFormat; elements->tags = cJSON_PrintUnformatted(tagsJson); elements->tagsLen = strlen(elements->tags); - if(is_same_child_table_telnet(elements, &info->preLine, 0) != 0) { + if(is_same_child_table_telnet(elements, &info->preLine) != 0) { ret = smlParseTagsFromJSON(info, tagsJson, elements); if (unlikely(ret)) { uError("OTD:0x%" PRIx64 " Unable to parse tags from JSON payload", info->id); @@ -1180,7 +1180,7 @@ static int32_t smlParseJSONString(SSmlHandle *info, char **start, SSmlLineInfo * } // Parse tags - if(is_same_child_table_telnet(elements, &info->preLine, 0) != 0){ + if(is_same_child_table_telnet(elements, &info->preLine) != 0){ char tmp = *(elements->tags + elements->tagsLen); *(elements->tags + elements->tagsLen) = 0; cJSON* tagsJson = cJSON_Parse(elements->tags); diff --git a/source/client/src/clientSmlTelnet.c b/source/client/src/clientSmlTelnet.c index c641e766f9..2b55a5875b 100644 --- a/source/client/src/clientSmlTelnet.c +++ b/source/client/src/clientSmlTelnet.c @@ -20,7 +20,7 @@ #include "clientSml.h" -int32_t is_same_child_table_telnet(const void *a, const void *b, size_t len){ +int32_t is_same_child_table_telnet(const void *a, const void *b){ SSmlLineInfo *t1 = (SSmlLineInfo *)a; SSmlLineInfo *t2 = (SSmlLineInfo *)b; // uError("is_same_child_table_telnet len:%d,%d %s,%s @@@ len:%d,%d %s,%s", t1->measureLen, t2->measureLen, @@ -70,7 +70,7 @@ static void smlParseTelnetElement(char **sql, char *sqlEnd, char **data, int32_t } static int32_t smlParseTelnetTags(SSmlHandle *info, char *data, char *sqlEnd, SSmlLineInfo *elements, SSmlMsgBuf *msg) { - if(is_same_child_table_telnet(elements, &info->preLine, 0) == 0){ + if(is_same_child_table_telnet(elements, &info->preLine) == 0){ return TSDB_CODE_SUCCESS; }