Skip to content

Commit

Permalink
backupccl: update TestRestoreOldVersions subtest for system.privileges
Browse files Browse the repository at this point in the history
This patch updates the TestRestoreOldVersions subtest for the
system.privileges table to also test that a row for the public
role is correctly restored.

Release note: None
  • Loading branch information
andyyang890 committed Mar 25, 2023
1 parent 0865a54 commit 3b3b573
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/ccl/backupccl/restore_old_versions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ func fullClusterRestoreSystemPrivilegesWithoutIDs(exportDir string) func(t *test
sqlDB.Exec(t, fmt.Sprintf("RESTORE FROM '%s' WITH UNSAFE_RESTORE_INCOMPATIBLE_VERSION", localFoo))

sqlDB.CheckQueryResults(t, "SELECT * FROM system.privileges", [][]string{
{"public", "/vtable/crdb_internal/tables", "{}", "{}", "4"},
{"testuser1", "/global/", "{VIEWACTIVITY}", "{}", "100"},
{"testuser2", "/global/", "{MODIFYCLUSTERSETTING}", "{}", "101"},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ CREATE USER testuser2;
GRANT SYSTEM VIEWACTIVITY TO testuser1;

GRANT SYSTEM MODIFYCLUSTERSETTING TO testuser2;

REVOKE SELECT ON crdb_internal.tables FROM public;
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
U�IS
����
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
B:�|
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
�w
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

0 comments on commit 3b3b573

Please sign in to comment.