[TD-6091]<feature>:ignore tag size/column size error during multi-thread schemaless insertion
This commit is contained in:
parent
f261747458
commit
806451934b
|
@ -418,7 +418,7 @@ static int32_t applySchemaAction(TAOS* taos, SSchemaAction* action, SSmlLinesInf
|
||||||
}
|
}
|
||||||
taos_free_result(res);
|
taos_free_result(res);
|
||||||
|
|
||||||
if (code == TSDB_CODE_MND_INVALID_COLUMN_LENGTH) {
|
if (code == TSDB_CODE_MND_INVALID_COLUMN_LENGTH || code == TSDB_CODE_TSC_INVALID_COLUMN_LENGTH) {
|
||||||
TAOS_RES* res2 = taos_query(taos, "RESET QUERY CACHE");
|
TAOS_RES* res2 = taos_query(taos, "RESET QUERY CACHE");
|
||||||
code = taos_errno(res2);
|
code = taos_errno(res2);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
@ -439,7 +439,7 @@ static int32_t applySchemaAction(TAOS* taos, SSchemaAction* action, SSmlLinesInf
|
||||||
}
|
}
|
||||||
taos_free_result(res);
|
taos_free_result(res);
|
||||||
|
|
||||||
if (code == TSDB_CODE_MND_INVALID_TAG_LENGTH) {
|
if (code == TSDB_CODE_MND_INVALID_TAG_LENGTH || code == TSDB_CODE_TSC_INVALID_TAG_LENGTH) {
|
||||||
TAOS_RES* res2 = taos_query(taos, "RESET QUERY CACHE");
|
TAOS_RES* res2 = taos_query(taos, "RESET QUERY CACHE");
|
||||||
code = taos_errno(res2);
|
code = taos_errno(res2);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
|
|
@ -6021,7 +6021,6 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
|
||||||
const char* msg19 = "invalid new tag name";
|
const char* msg19 = "invalid new tag name";
|
||||||
const char* msg20 = "table is not super table";
|
const char* msg20 = "table is not super table";
|
||||||
const char* msg21 = "only binary/nchar column length could be modified";
|
const char* msg21 = "only binary/nchar column length could be modified";
|
||||||
const char* msg22 = "new column length should be bigger than old one";
|
|
||||||
const char* msg23 = "only column length coulbe be modified";
|
const char* msg23 = "only column length coulbe be modified";
|
||||||
const char* msg24 = "invalid binary/nchar column length";
|
const char* msg24 = "invalid binary/nchar column length";
|
||||||
|
|
||||||
|
@ -6317,7 +6316,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pItem->bytes <= pColSchema->bytes) {
|
if (pItem->bytes <= pColSchema->bytes) {
|
||||||
return invalidOperationMsg(pMsg, msg22);
|
return tscErrorMsgWithCode(TSDB_CODE_TSC_INVALID_COLUMN_LENGTH, tscGetErrorMsgPayload(pCmd), pItem->name, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
SSchema* pSchema = (SSchema*) pTableMetaInfo->pTableMeta->schema;
|
SSchema* pSchema = (SSchema*) pTableMetaInfo->pTableMeta->schema;
|
||||||
|
@ -6368,7 +6367,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pItem->bytes <= pColSchema->bytes) {
|
if (pItem->bytes <= pColSchema->bytes) {
|
||||||
return invalidOperationMsg(pMsg, msg22);
|
return tscErrorMsgWithCode(TSDB_CODE_TSC_INVALID_TAG_LENGTH, tscGetErrorMsgPayload(pCmd), pItem->name, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
SSchema* pSchema = tscGetTableTagSchema(pTableMetaInfo->pTableMeta);
|
SSchema* pSchema = tscGetTableTagSchema(pTableMetaInfo->pTableMeta);
|
||||||
|
|
|
@ -104,6 +104,8 @@ int32_t* taosGetErrno();
|
||||||
#define TSDB_CODE_TSC_LINE_SYNTAX_ERROR TAOS_DEF_ERROR_CODE(0, 0x021B) //"Syntax error in Line")
|
#define TSDB_CODE_TSC_LINE_SYNTAX_ERROR TAOS_DEF_ERROR_CODE(0, 0x021B) //"Syntax error in Line")
|
||||||
#define TSDB_CODE_TSC_NO_META_CACHED TAOS_DEF_ERROR_CODE(0, 0x021C) //"No table meta cached")
|
#define TSDB_CODE_TSC_NO_META_CACHED TAOS_DEF_ERROR_CODE(0, 0x021C) //"No table meta cached")
|
||||||
#define TSDB_CODE_TSC_DUP_COL_NAMES TAOS_DEF_ERROR_CODE(0, 0x021D) //"duplicated column names")
|
#define TSDB_CODE_TSC_DUP_COL_NAMES TAOS_DEF_ERROR_CODE(0, 0x021D) //"duplicated column names")
|
||||||
|
#define TSDB_CODE_TSC_INVALID_TAG_LENGTH TAOS_DEF_ERROR_CODE(0, 0x021E) //"Invalid tag length")
|
||||||
|
#define TSDB_CODE_TSC_INVALID_COLUMN_LENGTH TAOS_DEF_ERROR_CODE(0, 0x021F) //"Invalid tag length")
|
||||||
|
|
||||||
// mnode
|
// mnode
|
||||||
#define TSDB_CODE_MND_MSG_NOT_PROCESSED TAOS_DEF_ERROR_CODE(0, 0x0300) //"Message not processed")
|
#define TSDB_CODE_MND_MSG_NOT_PROCESSED TAOS_DEF_ERROR_CODE(0, 0x0300) //"Message not processed")
|
||||||
|
|
Loading…
Reference in New Issue