Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: interleaved tables notice was incorrectly labeled as an error #70525

Merged
merged 1 commit into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/ccl/logictestccl/testdata/logic_test/partitioning
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ CREATE TABLE interleave_root (a INT PRIMARY KEY) PARTITION BY LIST (a) (
PARTITION p0 VALUES IN (0)
)

statement notice ERROR: creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored. For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations
statement notice NOTICE: creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored. For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations
CREATE TABLE interleave_child (a INT PRIMARY KEY) INTERLEAVE IN PARENT interleave_root (a)

statement notice ERROR: creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored. For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations
statement notice NOTICE: creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored. For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations
CREATE TABLE t (a INT PRIMARY KEY) INTERLEAVE IN PARENT interleave_root (a) PARTITION BY LIST (a) (
PARTITION p0 VALUES IN (0)
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/ccl/logictestccl/testdata/logic_test/regional_by_row
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ LOCALITY REGIONAL BY ROW
statement ok
CREATE TABLE parent_table (pk INT PRIMARY KEY)

statement notice ERROR: creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored. For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations
statement notice NOTICE: creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored. For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations
CREATE TABLE regional_by_row_table_int (
pk INT NOT NULL PRIMARY KEY
)
Expand Down Expand Up @@ -348,7 +348,7 @@ CREATE INDEX bad_idx ON regional_by_row_table(a) USING HASH WITH BUCKET_COUNT =
statement error hash sharded indexes are not compatible with REGIONAL BY ROW tables
ALTER TABLE regional_by_row_table ALTER PRIMARY KEY USING COLUMNS(pk2) USING HASH WITH BUCKET_COUNT = 8

statement notice ERROR: creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored. For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations
statement notice NOTICE: creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored. For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations
CREATE INDEX bad_idx_int ON regional_by_row_table(pk) INTERLEAVE IN PARENT parent_table(pk)

statement ok
Expand Down
9 changes: 3 additions & 6 deletions pkg/sql/create_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,12 +614,9 @@ var interleavedTableDisabledError = errors.WithIssueLink(
errors.IssueLink{IssueURL: build.MakeIssueURL(52009)},
)

var interleavedTableDisabledMigrationError = errors.WithIssueLink(
pgerror.New(pgcode.WarningDeprecatedFeature,
"creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored."+
" For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations"),
errors.IssueLink{IssueURL: build.MakeIssueURL(52009)},
)
var interleavedTableDisabledMigrationError = pgnotice.Newf(
"creation of new interleaved tables or interleaved indexes is no longer supported and will be ignored." +
" For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0#deprecations")

// interleavedTableDeprecationAction either returns an error, if interleaved
// tables are disabled, or sends a notice, if they're not. Returns any error
Expand Down