提交 163ef462 编写于 作者: G Ganlin Zhao

[TD-10700]<fix>: fixed tag/column name length 64 issue

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