From 9ec1f11741034bfa870b5ac91d26918dda4ca836 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Fri, 23 Jul 2021 18:21:25 +0800 Subject: [PATCH] fix error of total tags length and total columns length --- src/client/src/tscSQLParser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 39b1a5e8d3..9a3b36895d 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -6020,7 +6020,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { int16_t i; uint32_t nLen = 0; for (i = 0; i < numOfColumns; ++i) { - nLen += pSchema[i].colId != columnIndex.columnIndex ? pSchema[i].bytes : pItem->bytes; + nLen += (i != columnIndex.columnIndex) ? pSchema[i].bytes : pItem->bytes; } if (nLen >= TSDB_MAX_BYTES_PER_ROW) { return invalidOperationMsg(pMsg, msg24); @@ -6071,7 +6071,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { int16_t i; uint32_t nLen = 0; for (i = 0; i < numOfTags; ++i) { - nLen += pSchema[i].colId != columnIndex.columnIndex ? pSchema[i].bytes : pItem->bytes; + nLen += (i != columnIndex.columnIndex) ? pSchema[i].bytes : pItem->bytes; } if (nLen >= TSDB_MAX_TAGS_LEN) { return invalidOperationMsg(pMsg, msg24); -- GitLab