Cherry-picked from #46115 Co-authored-by: zhangdong <zhangdong@selectdb.com>
This commit is contained in:
committed by
GitHub
parent
4b69673e4e
commit
53889cbbb6
@ -595,11 +595,11 @@ public class Auth implements Writable {
|
||||
private void grantInternal(UserIdentity userIdent, String role, TablePattern tblPattern, PrivBitSet privs,
|
||||
Map<ColPrivilegeKey, Set<String>> colPrivileges, boolean errOnNonExist, boolean isReplay)
|
||||
throws DdlException {
|
||||
if (!isReplay) {
|
||||
checkTablePatternExist(tblPattern, privs);
|
||||
}
|
||||
writeLock();
|
||||
try {
|
||||
if (!isReplay) {
|
||||
checkTablePatternExist(tblPattern, privs);
|
||||
}
|
||||
if (role == null) {
|
||||
if (!doesUserExist(userIdent)) {
|
||||
throw new DdlException("user " + userIdent + " does not exist");
|
||||
|
||||
Reference in New Issue
Block a user