提交 3342d6aa 编写于 作者: G Ganlin Zhao

reverted tag/column length fix

上级 163ef462
......@@ -57,7 +57,7 @@ typedef enum {
} TSDB_OPTION;
typedef struct taosField {
char name[67]; //65 + 2(for backstick escape characters)
char name[65];
uint8_t type;
int16_t bytes;
} TAOS_FIELD;
......
......@@ -68,6 +68,9 @@ SSqlInfo qSqlParse(const char *pStr) {
sqlInfo.valid = false;
goto abort_parse;
}
case TK_ID:
tscRmEscapeAndTrimToken(&t0);
//fall through
default:
Parse(pParser, t0.type, t0, &sqlInfo);
if (sqlInfo.valid == false) {
......@@ -617,10 +620,7 @@ void tSetDbName(SStrToken *pCpxName, SStrToken *pDb) {
}
void tSetColumnInfo(TAOS_FIELD *pField, SStrToken *pName, TAOS_FIELD *pType) {
int32_t maxLen = sizeof(pField->name) / sizeof(pField->name[0]) - TS_ESCAPE_CHAR_SIZE;
if (pName->z[0] == '`' && pName->z[pName->n - 1] == '`') {
maxLen = maxLen + TS_ESCAPE_CHAR_SIZE;
}
int32_t maxLen = sizeof(pField->name) / sizeof(pField->name[0]);
// column name is too long, set the it to be invalid.
if ((int32_t) pName->n >= maxLen) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册