diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index d1aeaac5875da6e781c731ab8098180f5b52210e..4cd1b5416c31e7d22dce0d8f8a15c56c6c51c9b2 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -2082,7 +2082,7 @@ static int32_t smlParseJSONString(SSmlHandle *info, cJSON *root, SSmlTableInfo * static int32_t smlParseInfluxLine(SSmlHandle *info, const char *sql, const int len) { SSmlLineInfo elements = {0}; - uDebug("SML:0x%" PRIx64 " smlParseInfluxLine sql:%s, hello", info->id, sql); + uDebug("SML:0x%" PRIx64 " smlParseInfluxLine sql", info->id); int ret = smlParseInfluxString(sql, sql + len, &elements, &info->msgBuf); if (ret != TSDB_CODE_SUCCESS) { diff --git a/utils/test/c/sml_test.c b/utils/test/c/sml_test.c index 83dfa1fc576cc883a205e891ca4dc1c8258daf12..40d5bb12d2ffa01c18857b9177a47a2afe0e17a1 100644 --- a/utils/test/c/sml_test.c +++ b/utils/test/c/sml_test.c @@ -1097,18 +1097,12 @@ int sml_time_Test() { pRes = taos_query(taos, "use sml_db"); taos_free_result(pRes); - char* tmp = (char*)taosMemoryCalloc(1024, 1); - memcpy(tmp, sql[0], strlen(sql[0])); - *(char*)(tmp+44) = 0; - int32_t totalRows = 0; - pRes = taos_schemaless_insert_raw(taos, tmp, strlen(sql[0]), &totalRows, TSDB_SML_LINE_PROTOCOL, TSDB_SML_TIMESTAMP_NANO_SECONDS); + pRes = taos_schemaless_insert(taos, (char **)sql, sizeof(sql) / sizeof(sql[0]), TSDB_SML_LINE_PROTOCOL, TSDB_SML_TIMESTAMP_NANO_SECONDS); - ASSERT(totalRows == 3); printf("%s result:%s\n", __FUNCTION__, taos_errstr(pRes)); int code = taos_errno(pRes); taos_free_result(pRes); taos_close(taos); - taosMemoryFree(tmp); return code; }