fix error of total tags length and total columns length

This commit is contained in:
shenglian zhou 2021-07-23 18:21:25 +08:00
parent 757a9736d1
commit 9ec1f11741
1 changed files with 2 additions and 2 deletions

View File

@ -6020,7 +6020,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
int16_t i; int16_t i;
uint32_t nLen = 0; uint32_t nLen = 0;
for (i = 0; i < numOfColumns; ++i) { 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) { if (nLen >= TSDB_MAX_BYTES_PER_ROW) {
return invalidOperationMsg(pMsg, msg24); return invalidOperationMsg(pMsg, msg24);
@ -6071,7 +6071,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
int16_t i; int16_t i;
uint32_t nLen = 0; uint32_t nLen = 0;
for (i = 0; i < numOfTags; ++i) { 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) { if (nLen >= TSDB_MAX_TAGS_LEN) {
return invalidOperationMsg(pMsg, msg24); return invalidOperationMsg(pMsg, msg24);