提交 bb908a9b 编写于 作者: A Alex Duan

fix(query): alter user with tag filter check valid

上级 2d24c72c
...@@ -862,6 +862,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { ...@@ -862,6 +862,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
const char* msg3 = "name too long"; const char* msg3 = "name too long";
const char* msg5 = "invalid user rights"; const char* msg5 = "invalid user rights";
const char* msg7 = "not support options"; const char* msg7 = "not support options";
const char* msg8 = "tags filter string length must less than 255 bytes.";
pCmd->command = pInfo->type; pCmd->command = pInfo->type;
...@@ -900,6 +901,9 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { ...@@ -900,6 +901,9 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
} else { } else {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg5); return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg5);
} }
} else if (pUser->type == TSDB_ALTER_USER_TAGS) {
SStrToken* pTags = &pUser->tags;
if (pTags->n < 4) return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg8);
} else { } else {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg7); return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg7);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册