From ad61b5b593e4ca745b5329fcecc2607a7bedc9d5 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 30 Nov 2022 17:07:30 +0800 Subject: [PATCH] fix:add log --- source/client/src/clientSml.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 28e873cca3..5381b2c0dd 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -815,6 +815,11 @@ static int8_t smlGetTsTypeByPrecision(int8_t precision) { } static int64_t smlParseInfluxTime(SSmlHandle *info, const char *data, int32_t len) { + char *tmp = taosMemoryCalloc(1, len + 1); + memcpy(tmp, data, len); + uDebug("SML:0x%" PRIx64 " smlParseInfluxTime ts:%s", info->id, tmp); + taosMemoryFree(tmp); + if (len == 0 || (len == 1 && data[0] == '0')) { return taosGetTimestampNs(); } @@ -2066,7 +2071,10 @@ 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", info->id, (info->isRawLine ? "rawdata" : sql)); + char *tmp = taosMemoryCalloc(1, len + 1); + memcpy(tmp, sql, len); + uDebug("SML:0x%" PRIx64 " smlParseInfluxLine raw:%d, sql:%s", info->id, info->isRawLine, (info->isRawLine ? tmp : sql)); + taosMemoryFree(tmp); int ret = smlParseInfluxString(sql, sql + len, &elements, &info->msgBuf); if (ret != TSDB_CODE_SUCCESS) { -- GitLab