提交 b24cf98e 编写于 作者: C cademfly

use only one altertype for both table and cond

上级 d85d1bf5
......@@ -685,9 +685,23 @@ static int32_t mndTablePriviledge(SMnode *pMnode, SHashObj *hash, SAlterUserReq
snprintf(tbFName, sizeof(tbFName), "%s.%s", alterReq->objname, alterReq->tabName);
int32_t len = strlen(tbFName) + 1;
if(alterReq->tagCond != NULL && alterReq->tagCondLen != 0){
char *value = taosHashGet(hash, tbFName, len);
if(value != NULL){
terrno = TSDB_CODE_MND_PRIVILEDGE_EXIST;
return -1;
}
int32_t condLen = alterReq->tagCondLen + 1;
if (taosHashPut(hash, tbFName, len, alterReq->tagCond, condLen) != 0) {
return -1;
}
}
else{
if (taosHashPut(hash, tbFName, len, "t", 2) != 0) {
return -1;
}
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册