Skip to content

Commit

Permalink
Merge pull request #93435 from rafiss/fix-drop-role-system-priv
Browse files Browse the repository at this point in the history
  • Loading branch information
rafiss authored Dec 13, 2022
2 parents 9a14474 + 8681d24 commit ccce779
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/sql/drop_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"sort"
"strings"

"github.com/cockroachdb/cockroach/pkg/clusterversion"
"github.com/cockroachdb/cockroach/pkg/security/username"
"github.com/cockroachdb/cockroach/pkg/sql/catalog"
"github.com/cockroachdb/cockroach/pkg/sql/catalog/catpb"
Expand Down Expand Up @@ -586,6 +587,9 @@ func addDependentPrivilegesFromSystemPrivileges(
privilegeObjectFormatter *tree.FmtCtx,
userNamesToDependentPrivileges map[username.SQLUsername][]objectAndType,
) (retErr error) {
if !p.ExecCfg().Settings.Version.IsActive(ctx, clusterversion.SystemPrivilegesTable) {
return nil
}
names := make([]string, len(usernames))
for i, username := range usernames {
names[i] = username.Normalized()
Expand Down

0 comments on commit ccce779

Please sign in to comment.