-
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.
clusterversion: add a gate for new system privileges
A 22.2/23.1 mixed version cluster cannot handle new system privileges well. This commit gates their usage and adds a test. Without this gate, the included test would fail and users would not be able to log in to nodes running on the old binary. Release note: None
- Loading branch information
Showing
9 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
op | ||
---- | ||
debug declarative-print-rules 1000022.2-76 op | ||
debug declarative-print-rules 1000022.2-78 op | ||
rules | ||
---- | ||
[] |
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
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
18 changes: 18 additions & 0 deletions
18
pkg/sql/logictest/testdata/logic_test/mixed_version_new_system_privileges
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,18 @@ | ||
# LogicTest: cockroach-go-testserver-upgrade-to-master | ||
|
||
upgrade 0 | ||
|
||
upgrade 1 | ||
|
||
statement error upgrade must be finalized before using MODIFYSQLCLUSTERSETTING | ||
GRANT SYSTEM MODIFYSQLCLUSTERSETTING TO testuser | ||
|
||
statement error upgrade must be finalized before using VIEWJOB | ||
GRANT SYSTEM VIEWJOB TO testuser | ||
|
||
# Verify that a non-root user can login on the upgraded node. | ||
user testuser nodeidx=0 | ||
|
||
# The non-root user should not be able to set cluster settings on the new node. | ||
statement error only users with the MODIFYCLUSTERSETTING or MODIFYSQLCLUSTERSETTING privilege are allowed to set cluster setting 'sql.defaults.default_int_size' | ||
SET CLUSTER SETTING sql.defaults.default_int_size = 8 |
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.