From 00b69c19ee40236b22f09207d9557d14328594d9 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Tue, 3 May 2022 16:53:57 +0800 Subject: [PATCH] safe bound for max row length --- 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 4f47c7c5f8..e9a2ff9ed6 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -846,7 +846,7 @@ static int32_t addChildTableDataPointsToInsertSql(char* cTableName, char* sTable } for (int i = 0; i < numTags; ++i) { - if (capacity - totalLen < 1024 * 16) { + if (capacity - totalLen < TSDB_MAX_BYTES_PER_ROW) { goto _cleanup; } if (tagKVs[i] == NULL) { @@ -887,7 +887,7 @@ static int32_t addChildTableDataPointsToInsertSql(char* cTableName, char* sTable } for (; r < rows; ++r) { - if (capacity - totalLen < 1024 * 16) { + if (capacity - totalLen < TSDB_MAX_BYTES_PER_ROW) { break; } ret = smlSnprintf(sql, &totalLen, capacity, "("); -- GitLab