forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql,clusterversion: add a cluster version for procedures
Release note: None
- Loading branch information
Showing
16 changed files
with
174 additions
and
101 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
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,3 +1,5 @@ | ||
# LogicTest: !local-mixed-22.2-23.1 | ||
|
||
statement ok | ||
CREATE PROCEDURE p_test_drop() LANGUAGE SQL AS 'SELECT 1' | ||
|
||
|
49 changes: 49 additions & 0 deletions
49
pkg/sql/logictest/testdata/logic_test/mixed_version_procedure
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,49 @@ | ||
# LogicTest: cockroach-go-testserver-upgrade-to-master | ||
|
||
# Verify that all nodes are running the previous version. | ||
|
||
query T nodeidx=0 | ||
SELECT crdb_internal.node_executable_version() | ||
---- | ||
23.1 | ||
|
||
query T nodeidx=1 | ||
SELECT crdb_internal.node_executable_version() | ||
---- | ||
23.1 | ||
|
||
query T nodeidx=2 | ||
SELECT crdb_internal.node_executable_version() | ||
---- | ||
23.1 | ||
|
||
upgrade 0 | ||
|
||
user root nodeidx=0 | ||
|
||
# Creating a procedure should fail with an unimplemented error. | ||
statement error unimplemented: procedures are not yet supported | ||
CREATE PROCEDURE p() LANGUAGE SQL AS 'SELECT 1' | ||
|
||
user root nodeidx=1 | ||
|
||
# These statements should fail with a parsing error. | ||
statement error at or near "procedure": syntax error | ||
CREATE PROCEDURE p() LANGUAGE SQL AS 'SELECT 1' | ||
|
||
# Upgrade all nodes. | ||
|
||
upgrade 1 | ||
|
||
upgrade 2 | ||
|
||
# Makes sure the upgrade job has finished, and the cluster version gate is | ||
# passed. | ||
query B retry | ||
SELECT crdb_internal.is_at_least_version('23.1-32') | ||
---- | ||
true | ||
|
||
# Creating a procedure should now be possible. | ||
statement ok | ||
CREATE PROCEDURE p() LANGUAGE SQL AS 'SELECT 1' |
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,3 +1,5 @@ | ||
# LogicTest: !local-mixed-22.2-23.1 | ||
|
||
statement ok | ||
CREATE PROCEDURE p() LANGUAGE SQL AS 'SELECT 1' | ||
|
||
|
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,3 +1,5 @@ | ||
# LogicTest: !local-mixed-22.2-23.1 | ||
|
||
statement ok | ||
CREATE TABLE t ( | ||
k INT PRIMARY KEY, | ||
|
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,3 +1,5 @@ | ||
# LogicTest: !local-mixed-22.2-23.1 | ||
|
||
subtest grant_revoke | ||
|
||
statement ok | ||
|
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
Oops, something went wrong.