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 ALTER TABLE descriptorChanged bug #52819

Merged
merged 1 commit into from
Aug 14, 2020

Conversation

solongordon
Copy link
Contributor

There was some bad accounting in the ALTER TABLE command for whether the
table descriptor had changed or not. This meant that for ALTER TABLE
statements with multiple actions, we might incorrectly treat the whole
statement as a no-op if the last action had no effect.

Fixes #52816

Release note (bug fix): Fixed a bug for ALTER TABLE statements with
multiple actions. In certain cases if the last action had no effect, the
entire statement would be treated as a no-op.

There was some bad accounting in the ALTER TABLE command for whether the
table descriptor had changed or not. This meant that for ALTER TABLE
statements with multiple actions, we might incorrectly treat the whole
statement as a no-op if the last action had no effect.

Fixes cockroachdb#52816

Release note (bug fix): Fixed a bug for ALTER TABLE statements with
multiple actions. In certain cases if the last action had no effect, the
entire statement would be treated as a no-op.
@solongordon solongordon requested review from RichardJCai and a team August 14, 2020 15:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@RichardJCai RichardJCai left a comment

Choose a reason for hiding this comment

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

Ooh good catch

@solongordon
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 14, 2020

Build succeeded:

@craig craig bot merged commit b289a79 into cockroachdb:master Aug 14, 2020
@solongordon solongordon deleted the alter-table-noop-fix branch August 24, 2020 14:01
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.

sql: ALTER TABLE commands can incorrectly become no-ops
3 participants