This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 15a51d5172d45b8c5d74c02ac285e03c46530f4e
Author: Mingyu Chen <[email protected]>
AuthorDate: Mon Jan 9 08:38:26 2023 +0800

    [fix](meta) fix priv table load bug when upgrading to 1.2.x (#15706)
    
    In old version, NODE_PRIV will be incorrectly assigned to normal users.
    So when upgrading to 1.2.x, it will failed to handle this unexpected case.
    This PR fix this by removing NODE_PRIV from normal user.
---
 .../src/main/java/org/apache/doris/mysql/privilege/UserPrivTable.java    | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPrivTable.java 
b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPrivTable.java
index 354da66904..35736b29fe 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPrivTable.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPrivTable.java
@@ -208,6 +208,7 @@ public class UserPrivTable extends PrivTable {
                     // USAGE_PRIV is no need to degrade.
                     PrivBitSet removeUsagePriv = 
globalPrivEntry.privSet.copy();
                     removeUsagePriv.unset(PaloPrivilege.USAGE_PRIV.getIdx());
+                    removeUsagePriv.unset(PaloPrivilege.NODE_PRIV.getIdx());
                     CatalogPrivEntry entry = 
CatalogPrivEntry.create(globalPrivEntry.origUser, globalPrivEntry.origHost,
                             InternalCatalog.INTERNAL_CATALOG_NAME, 
globalPrivEntry.isDomain, removeUsagePriv);
                     entry.setSetByDomainResolver(false);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to