fix:num of cols add num of tags should not be bigger than 4096
This commit is contained in:
parent
43862ccd74
commit
947f39523e
|
@ -2057,10 +2057,6 @@ static int32_t smlParseInfluxLine(SSmlHandle *info, const char *sql) {
|
||||||
if (info->dataFormat) taosArrayDestroy(cols);
|
if (info->dataFormat) taosArrayDestroy(cols);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if (taosArrayGetSize(cols) > TSDB_MAX_COLUMNS) {
|
|
||||||
smlBuildInvalidDataMsg(&info->msgBuf, "too many columns than 4096", NULL);
|
|
||||||
return TSDB_CODE_PAR_TOO_MANY_COLUMNS;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool hasTable = true;
|
bool hasTable = true;
|
||||||
SSmlTableInfo *tinfo = NULL;
|
SSmlTableInfo *tinfo = NULL;
|
||||||
|
@ -2094,6 +2090,11 @@ static int32_t smlParseInfluxLine(SSmlHandle *info, const char *sql) {
|
||||||
return TSDB_CODE_PAR_INVALID_TAGS_NUM;
|
return TSDB_CODE_PAR_INVALID_TAGS_NUM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (taosArrayGetSize(cols) + taosArrayGetSize((*oneTable)->tags) > TSDB_MAX_COLUMNS) {
|
||||||
|
smlBuildInvalidDataMsg(&info->msgBuf, "too many columns than 4096", NULL);
|
||||||
|
return TSDB_CODE_PAR_TOO_MANY_COLUMNS;
|
||||||
|
}
|
||||||
|
|
||||||
(*oneTable)->sTableName = elements.measure;
|
(*oneTable)->sTableName = elements.measure;
|
||||||
(*oneTable)->sTableNameLen = elements.measureLen;
|
(*oneTable)->sTableNameLen = elements.measureLen;
|
||||||
if (strlen((*oneTable)->childTableName) == 0) {
|
if (strlen((*oneTable)->childTableName) == 0) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -536,7 +536,7 @@ int32_t mndCheckCreateStbReq(SMCreateStbReq *pCreate) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pCreate->numOfColumns < TSDB_MIN_COLUMNS || pCreate->numOfColumns > TSDB_MAX_COLUMNS) {
|
if (pCreate->numOfColumns < TSDB_MIN_COLUMNS || pCreate->numOfTags + pCreate->numOfColumns > TSDB_MAX_COLUMNS) {
|
||||||
terrno = TSDB_CODE_PAR_INVALID_COLUMNS_NUM;
|
terrno = TSDB_CODE_PAR_INVALID_COLUMNS_NUM;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue