-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: panic: add column T[] unique #26483
Comments
This panics 2.0.2 so we should fix that in master and backport. |
Sentry issue: COCKROACHDB-GY |
@vivekmenezes I'll update the |
@bobvawter note there are multiple types besides arrays that are non-indexable. for example JSON. Perhaps make multiple tests? |
26684: sql: Fix panic adding unique, non-indexable column r=bobvawter a=bobvawter This change updates the `checkColumnsFor...Index` functions to use `allNonDropColumns()` to validate against any proposed mutations. Otherwise, a `ColumnMutation` that adds a non-indexable column followed by an `IndexMutation` creating an index on that column would would be incorrectly accepted, leading to a panic. Fixes #26483 Release note (sql change): Return an error to the user instead of panicing when trying to add a column with a unique constraint when that column's type is not indexable. 26705: roachtest: use --sequential when generating store dumps r=benesch a=petermattis This makes the mapping from cockroach node ID to roachprod node ID the identify function. Release note: None Co-authored-by: Bob Vawter <[email protected]> Co-authored-by: Peter Mattis <[email protected]>
26728: backport 2.0: sql: Fix panic adding unique, non-indexable column r=bobvawter a=bobvawter This change updates the `checkColumnsFor...Index` functions to use `allNonDropColumns()` to validate against any proposed mutations. Otherwise, a `ColumnMutation` that adds a non-indexable column followed by an `IndexMutation` creating an index on that column would would be incorrectly accepted, leading to a panic. Fixes #26483 Release note (sql change): Return an error to the user instead of panicing when trying to add a column with a unique constraint when that column's type is not indexable. Co-authored-by: Bob Vawter <[email protected]>
create table t(); alter table t ADD COLUMN c int[] UNIQUE;
panic while executing 1 statements: ALTER TABLE _ ADD COLUMN _ INT[] UNIQUE; caused by unimplemented: column c is of type ARRAY and thus is not indexable
Found with RSG.
The text was updated successfully, but these errors were encountered: