[TD-5484]<fix>:fix tag column modify total length check that checked columns instead of tags
This commit is contained in:
parent
269a7cead6
commit
b04048091f
|
@ -1824,6 +1824,7 @@ int taos_insert_lines(TAOS* taos, char* lines[], int numLines) {
|
||||||
cleanup:
|
cleanup:
|
||||||
tscDebug("taos_insert_lines finish inserting %d lines. code: %d", numLines, code);
|
tscDebug("taos_insert_lines finish inserting %d lines. code: %d", numLines, code);
|
||||||
points = TARRAY_GET_START(lpPoints);
|
points = TARRAY_GET_START(lpPoints);
|
||||||
|
numPoints = taosArrayGetSize(lpPoints);
|
||||||
for (int i=0; i<numPoints; ++i) {
|
for (int i=0; i<numPoints; ++i) {
|
||||||
destroySmlDataPoint(points+i);
|
destroySmlDataPoint(points+i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6066,11 +6066,11 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
|
||||||
return invalidOperationMsg(pMsg, msg22);
|
return invalidOperationMsg(pMsg, msg22);
|
||||||
}
|
}
|
||||||
|
|
||||||
SSchema* pSchema = (SSchema*) pTableMetaInfo->pTableMeta->schema;
|
SSchema* pSchema = tscGetTableTagSchema(pTableMetaInfo->pTableMeta);
|
||||||
int16_t numOfColumns = pTableMetaInfo->pTableMeta->tableInfo.numOfColumns;
|
int16_t numOfTags = tscGetNumOfTags(pTableMetaInfo->pTableMeta);
|
||||||
int16_t i;
|
int16_t i;
|
||||||
uint32_t nLen = 0;
|
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;
|
nLen += pSchema[i].colId != columnIndex.columnIndex ? pSchema[i].bytes : pItem->bytes;
|
||||||
}
|
}
|
||||||
if (nLen >= TSDB_MAX_TAGS_LEN) {
|
if (nLen >= TSDB_MAX_TAGS_LEN) {
|
||||||
|
|
Loading…
Reference in New Issue