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

release-19.1: sql: fix ALTER INDEX IF EXISTS for non-existing index #42839

Merged
merged 2 commits into from
Nov 27, 2019

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Nov 27, 2019

Backport 2/2 commits from #42797.

/cc @cockroachdb/release


Previously, if ALTER INDEX IF EXISTS was used on an
unqualified index name that did not match any index, the database would
return an "index does not exist" error.

Now, the statement succeeds, but does nothing.

Also, test edge cases around ambiguous, non-existing, and/or unqualified
index names, in both alter_index and drop_index logic tests.

Fixes #42399

Release note (bug fix): ALTER INDEX IF EXISTS no longer fails
when using an unqualified index name that does not match any existing
index. Now it is a no-op.

Previously, if ALTER INDEX IF EXISTS (AIIE) was used on an
unqualified index name that did not match any index, the database would
return an "index does not exist" error.

Now, the statement succeeds, but does nothing.

Release note (bug fix): ALTER INDEX IF EXISTS no longer fails
when using an unqualified index name that does not match any existing
index. Now it is a no-op.
Test edge cases around ambiguous, non-existing, and/or unqualified
index names, to reach test parity with alter_index logic test.

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@apantel apantel left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @apantel and @jordanlewis)

@rafiss rafiss merged commit 549d5bb into cockroachdb:release-19.1 Nov 27, 2019
@rafiss rafiss deleted the backport19.1-42797 branch December 10, 2019 16:02
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.

3 participants