-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: add mixed version test for system.privileges user ID migration
This patch adds a mixed version logic test that ensures granting of system privileges continues to work properly in a cluster that has both 22.2 and 23.1 nodes. The relevant version gate being tested here is V23_1SystemPrivilegesTableHasUserIDColumn. Release note: None
- Loading branch information
1 parent
86ad731
commit 7bf12b6
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
pkg/sql/logictest/testdata/logic_test/mixed_version_system_privileges_user_id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# LogicTest: cockroach-go-testserver-upgrade-to-master | ||
|
||
# Grant system privileges in a mixed version cluster. | ||
|
||
statement ok | ||
CREATE USER testuser1 | ||
|
||
upgrade 1 | ||
|
||
user root nodeidx=1 | ||
|
||
statement ok | ||
REVOKE SELECT ON crdb_internal.tables FROM public | ||
|
||
statement ok | ||
GRANT SYSTEM MODIFYCLUSTERSETTING TO testuser1 | ||
|
||
user root nodeidx=2 | ||
|
||
statement ok | ||
GRANT SYSTEM CANCELQUERY TO testuser1 | ||
|
||
query TTTT | ||
SELECT username, path, privileges, grant_options FROM system.privileges | ||
---- | ||
public /vtable/crdb_internal/tables {} {} | ||
testuser1 /global/ {CANCELQUERY,MODIFYCLUSTERSETTING} {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master/generated_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.