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: stop returning dropped unique columns in DELETE RETURNING #33438

Merged
merged 1 commit into from
Jan 3, 2019

Conversation

vivekmenezes
Copy link
Contributor

this change is a followup to fix #32188

unique columns have an index on them. When such a column is dropped,
a DELETE statement will read a dropped column to correctly drop
the index on it, but this dropped column is exposed through the
RETURNING clause. This change stops exposing the column via RETURNING.

fixes #33361

Release note (sql change): fixed problem with returning dropped
unique columns in DELETE RETURNING statement.

this change is a followup to fix cockroachdb#32188

unique columns have an index on them. When such a column is dropped,
a DELETE statement will read a dropped column to correctly drop
the index on it, but this dropped column is exposed through the
RETURNING clause. This change stops exposing the column via RETURNING.

fixes cockroachdb#33361

Release note (sql change): fixed problem with returning dropped
unique columns in DELETE RETURNING statement.
@vivekmenezes vivekmenezes requested review from knz and a team January 2, 2019 17:21
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

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

Thank you!

@vivekmenezes
Copy link
Contributor Author

TFTR!

@vivekmenezes
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Jan 3, 2019
33438: sql: stop returning dropped unique columns in DELETE RETURNING r=vivekmenezes a=vivekmenezes

this change is a followup to fix #32188

unique columns have an index on them. When such a column is dropped,
a DELETE statement will read a dropped column to correctly drop
the index on it, but this dropped column is exposed through the
RETURNING clause. This change stops exposing the column via RETURNING.

fixes #33361

Release note (sql change): fixed problem with returning dropped
unique columns in DELETE RETURNING statement.

Co-authored-by: Vivek Menezes <vivek@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Jan 3, 2019

Build succeeded

@craig craig bot merged commit 0023c78 into cockroachdb:master Jan 3, 2019
@knz knz added this to Triage in (DEPRECATED) SQL Front-end, Lang & Semantics via automation Jan 5, 2019
@knz knz moved this from Triage to Monday pile in (DEPRECATED) SQL Front-end, Lang & Semantics Jan 5, 2019
@knz knz moved this from Monday pile to Finished (m2.2-3) in (DEPRECATED) SQL Front-end, Lang & Semantics Jan 5, 2019
@knz
Copy link
Contributor

knz commented Jan 7, 2019

maybe this wants a backport?

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: Incorrect results when deleting rows from table with index column being dropped
3 participants