From 02bef1fb72b8f82851f94241f9211350044e56e1 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Sat, 17 Jul 2021 13:18:22 +0800 Subject: [PATCH] fix invalidate read and log parse errorn line --- src/client/src/tscParseLineProtocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 7d7d7b8eb8..c2f0af962c 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -1460,7 +1460,7 @@ static int32_t parseSmlTimeStamp(TAOS_SML_KV **pTS, const char **index) { } if (len > 0) { - value = calloc(len, 1); + value = calloc(len+1, 1); memcpy(value, start, len); } @@ -1786,7 +1786,7 @@ int32_t tscParseLines(char* lines[], int numLines, SArray* points, SArray* faile TAOS_SML_DATA_POINT point = {0}; int32_t code = tscParseLine(lines[i], &point); if (code != TSDB_CODE_SUCCESS) { - tscError("data point line parse failed. line %d", i); + tscError("data point line parse failed. line %d : %s", i, lines[i]); return TSDB_CODE_TSC_LINE_SYNTAX_ERROR; } else { tscDebug("data point line parse success. line %d", i); -- GitLab