From b04048091f115fba76db79e69d74e9640d2e31bb Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Fri, 23 Jul 2021 15:53:15 +0800 Subject: [PATCH] [TD-5484]:fix tag column modify total length check that checked columns instead of tags --- src/client/src/tscParseLineProtocol.c | 1 + src/client/src/tscSQLParser.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 98d9c3ec65..e0aa2b4327 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -1824,6 +1824,7 @@ int taos_insert_lines(TAOS* taos, char* lines[], int numLines) { cleanup: tscDebug("taos_insert_lines finish inserting %d lines. code: %d", numLines, code); points = TARRAY_GET_START(lpPoints); + numPoints = taosArrayGetSize(lpPoints); for (int i=0; ipTableMeta->schema; - int16_t numOfColumns = pTableMetaInfo->pTableMeta->tableInfo.numOfColumns; + SSchema* pSchema = tscGetTableTagSchema(pTableMetaInfo->pTableMeta); + int16_t numOfTags = tscGetNumOfTags(pTableMetaInfo->pTableMeta); int16_t i; uint32_t nLen = 0; - for (i = 0; i < numOfColumns; ++i) { + for (i = 0; i < numOfTags; ++i) { nLen += pSchema[i].colId != columnIndex.columnIndex ? pSchema[i].bytes : pItem->bytes; } if (nLen >= TSDB_MAX_TAGS_LEN) { -- GitLab