From b26c683bc18f5c8306b3937de0e3d2bd398cf366 Mon Sep 17 00:00:00 2001 From: zhangdong Date: Fri, 27 Dec 2024 18:05:17 +0800 Subject: [PATCH] 1 --- .../main/java/org/apache/doris/mysql/privilege/Auth.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java index a0ff3140bc4b48..1b953620fd1b15 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java @@ -718,11 +718,11 @@ public void replayGrant(PrivInfo privInfo) { private void grantInternal(UserIdentity userIdent, String role, TablePattern tblPattern, PrivBitSet privs, Map> 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");