[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.
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user