[TD-5578]<fix> the max length of wild cards can be configured
This commit is contained in:
parent
1c0cc17ea6
commit
349818c9b1
|
@ -144,8 +144,8 @@ keepColumnName 1
|
||||||
# max length of an SQL
|
# max length of an SQL
|
||||||
# maxSQLLength 65480
|
# maxSQLLength 65480
|
||||||
|
|
||||||
# max length of like
|
# max length of WildCards
|
||||||
# maxLikeLength 100
|
# maxWildCardsLength 100
|
||||||
|
|
||||||
# the maximum number of records allowed for super table time sorting
|
# the maximum number of records allowed for super table time sorting
|
||||||
# maxNumOfOrderedRes 100000
|
# maxNumOfOrderedRes 100000
|
||||||
|
|
|
@ -4401,9 +4401,9 @@ static int32_t validateLikeExpr(tSqlExpr* pExpr, STableMeta* pTableMeta, int32_t
|
||||||
tSqlExpr* pRight = pExpr->pRight;
|
tSqlExpr* pRight = pExpr->pRight;
|
||||||
|
|
||||||
if (pExpr->tokenId == TK_LIKE) {
|
if (pExpr->tokenId == TK_LIKE) {
|
||||||
if (pRight->value.nLen > tsMaxLikeStringLen) {
|
if (pRight->value.nLen > tsMaxWildCardsLen) {
|
||||||
char tmp[64] = {0};
|
char tmp[64] = {0};
|
||||||
sprintf(tmp, msg1, tsMaxLikeStringLen);
|
sprintf(tmp, msg1, tsMaxWildCardsLen);
|
||||||
return invalidOperationMsg(msgBuf, tmp);
|
return invalidOperationMsg(msgBuf, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ extern int8_t tsKeepOriginalColumnName;
|
||||||
|
|
||||||
// client
|
// client
|
||||||
extern int32_t tsMaxSQLStringLen;
|
extern int32_t tsMaxSQLStringLen;
|
||||||
extern int32_t tsMaxLikeStringLen;
|
extern int32_t tsMaxWildCardsLen;
|
||||||
extern int8_t tsTscEnableRecordSql;
|
extern int8_t tsTscEnableRecordSql;
|
||||||
extern int32_t tsMaxNumOfOrderedResults;
|
extern int32_t tsMaxNumOfOrderedResults;
|
||||||
extern int32_t tsMinSlidingTime;
|
extern int32_t tsMinSlidingTime;
|
||||||
|
|
|
@ -76,7 +76,7 @@ int32_t tsCompressMsgSize = -1;
|
||||||
|
|
||||||
// client
|
// client
|
||||||
int32_t tsMaxSQLStringLen = TSDB_MAX_ALLOWED_SQL_LEN;
|
int32_t tsMaxSQLStringLen = TSDB_MAX_ALLOWED_SQL_LEN;
|
||||||
int32_t tsMaxLikeStringLen = TSDB_PATTERN_STRING_MAX_LEN;
|
int32_t tsMaxWildCardsLen = TSDB_PATTERN_STRING_MAX_LEN;
|
||||||
int8_t tsTscEnableRecordSql = 0;
|
int8_t tsTscEnableRecordSql = 0;
|
||||||
|
|
||||||
// the maximum number of results for projection query on super table that are returned from
|
// the maximum number of results for projection query on super table that are returned from
|
||||||
|
@ -986,8 +986,8 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_BYTE;
|
cfg.unitType = TAOS_CFG_UTYPE_BYTE;
|
||||||
taosInitConfigOption(cfg);
|
taosInitConfigOption(cfg);
|
||||||
|
|
||||||
cfg.option = "maxLikeLength";
|
cfg.option = "maxWildCardsLength";
|
||||||
cfg.ptr = &tsMaxLikeStringLen;
|
cfg.ptr = &tsMaxWildCardsLen;
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT | TSDB_CFG_CTYPE_B_SHOW;
|
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT | TSDB_CFG_CTYPE_B_SHOW;
|
||||||
cfg.minValue = 0;
|
cfg.minValue = 0;
|
||||||
|
|
Loading…
Reference in New Issue