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: fix bug when dropping enum value when used in ARRAY column #111354

Merged

Conversation

Xiang-Gu
Copy link
Contributor

@Xiang-Gu Xiang-Gu commented Sep 27, 2023

Previously, if an enum value had been used at least twice in an ARRAY column in a table, attempts to drop that enum value resulted in a wrong error message. This PR fixes that.

Epic: None
Fix #110827
Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@Xiang-Gu Xiang-Gu force-pushed the bug/drop-enum-value-used-in-array-col branch from fc0941c to 202fbd9 Compare September 28, 2023 15:08
@Xiang-Gu Xiang-Gu requested a review from a team September 28, 2023 15:09
Copy link
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Nice find!

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @Xiang-Gu)


-- commits line 8 at r1:
Should this have a release note? This sounds like a user-facing bug

Previously, if an enum value is been used at least twice in a ARRAY column
in a table, attempts to drop that enum value results in a wrong error
message. This PR fixes that.

Release note (bug fix): Fix the error message when we attempt to drop an
enum value that is used at least twice in an ARRAY column.
@Xiang-Gu Xiang-Gu force-pushed the bug/drop-enum-value-used-in-array-col branch from 202fbd9 to 848327c Compare September 28, 2023 15:47
@Xiang-Gu Xiang-Gu marked this pull request as ready for review September 28, 2023 15:49
@Xiang-Gu
Copy link
Contributor Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build succeeded:

@craig craig bot merged commit af05d81 into cockroachdb:master Sep 28, 2023
@Xiang-Gu Xiang-Gu deleted the bug/drop-enum-value-used-in-array-col branch September 28, 2023 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

schemachanger: investigate "could not validate removal of enum value" error
3 participants