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: disallow de-computing a non-computed column #32279

Merged
merged 1 commit into from Nov 13, 2018

Conversation

Projects
None yet
3 participants
@bobvawter
Copy link
Contributor

bobvawter commented Nov 13, 2018

The current code allows a user to ALTER ... DROP STORED on columns that are
not, or never were, computed columns. This change checks that a column is in
fact a computed column before de-computing it.

Fixes: #32275

Release note (sql change): It is now an error to run ALTER TABLE ... DROP STORED on a column which is not actually a computed, stored column.
Previously, this statement would be a successful no-op.

@BramGruneir, this is a follow-up for your QA issue #28141 (comment)

I'll also plan to back-port this to 2.1.

sql: disallow de-computing a non-computed column
The current code allows a user to `ALTER ... DROP STORED` on columns that are
not, or never were, computed columns. This change checks that a column is in
fact a computed column before de-computing it.

Fixes: #32275

Release note (sql change): It is now an error to run `ALTER TABLE ... DROP
STORED` on a column which is not actually a computed, stored column.
Previously, this statement would be a successful no-op.

@bobvawter bobvawter requested a review from BramGruneir Nov 13, 2018

@bobvawter bobvawter requested review from cockroachdb/sql-execution-prs as code owners Nov 13, 2018

@cockroach-teamcity

This comment has been minimized.

Copy link
Member

cockroach-teamcity commented Nov 13, 2018

This change is Reviewable

@BramGruneir
Copy link
Member

BramGruneir left a comment

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@bobvawter

This comment has been minimized.

Copy link
Contributor

bobvawter commented Nov 13, 2018

bors r+

craig bot pushed a commit that referenced this pull request Nov 13, 2018

Merge #32279
32279: sql: disallow de-computing a non-computed column r=bobvawter a=bobvawter

The current code allows a user to `ALTER ... DROP STORED` on columns that are
not, or never were, computed columns. This change checks that a column is in
fact a computed column before de-computing it.

Fixes: #32275

Release note (sql change): It is now an error to run `ALTER TABLE ... DROP
STORED` on a column which is not actually a computed, stored column.
Previously, this statement would be a successful no-op.

@BramGruneir, this is a follow-up for your QA issue #28141 (comment)

I'll also plan to back-port this to 2.1.

Co-authored-by: Bob Vawter <bob@cockroachlabs.com>
@craig

This comment has been minimized.

Copy link

craig bot commented Nov 13, 2018

Build succeeded

@craig craig bot merged commit f19b2c1 into cockroachdb:master Nov 13, 2018

3 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@knz knz added this to Triage in SQL Front-end, Lang & Semantics via automation Nov 21, 2018

@knz knz moved this from Triage to Finished (m2.2-2) in SQL Front-end, Lang & Semantics Nov 21, 2018

@bobvawter bobvawter deleted the bobvawter:fix-32275 branch Dec 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment