sql: disallow ALTER COLUMN TYPE for columns stored in secondary indexes#72777
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Nov 16, 2021
Merged
Conversation
Member
Contributor
Author
|
This is the first of several PRs to come. I want to add validation that all index members are in the table and I want to make the |
Contributor
Author
postamar
approved these changes
Nov 15, 2021
It is broken. After the change, the index, after the change, refers to a column which is not in the table. Fixes cockroachdb#72718. Relates to cockroachdb#72771. Release note (sql change): The experimental `ALTER COLUMN TYPE` statement is no longer permitted when the column is stored in a secondary index. Prior to this change, that was the only sort of secondary index membership which was allowed, but the result of the operation was a subtly corrupted table.
5cfbb08 to
dccab78
Compare
Contributor
Author
|
TFTR bors r+ |
Contributor
|
Build succeeded: |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from dccab78 to blathers/backport-release-21.1-72777: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 21.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is broken. After the change, the index, after the change, refers to a column
which is not in the table.
Fixes #72718.
Relates to #72771.
Release note (sql change): The experimental
ALTER COLUMN TYPEstatementis no longer permitted when the column is stored in a secondary index. Prior
to this change, that was the only sort of secondary index membership which
was allowed, but the result of the operation was a subtly corrupted table.