Navigation Menu

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

cherrypick-2.0.1: sql: fix crash in physicalProps #24517

Merged
merged 1 commit into from Apr 5, 2018

Conversation

RaduBerinde
Copy link
Member

The addEquivalency method wasn't properly handling the case when one
of the columns is constant. This causes the other column to become
constant, and thus it needs to be removed from all weak keys.

Adding a test designed to catch the general class of bugs where a
mutation causes the invariants to be invalidated; verified that it
catches the problem.

Fixes #24500.

Release note (bug fix): Fixed a crash caused by a WHERE condition that
requires a column to equal a specific value and at the same time equal
another column.

Cherrypick of PR #24506. CC @cockroachdb/release

The `addEquivalency` method wasn't properly handling the case when one
of the columns is constant. This causes the other column to become
constant, and thus it needs to be removed from all weak keys.

Adding a test designed to catch the general class of bugs where a
mutation causes the invariants to be invalidated; verified that it
catches the problem.

Fixes cockroachdb#24500.

Release note (bug fix): Fixed a crash caused by a WHERE condition that
requires a column to equal a specific value and at the same time equal
another column.
@RaduBerinde RaduBerinde requested review from knz, petermattis and a team April 5, 2018 17:58
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

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

LGTM

@RaduBerinde
Copy link
Member Author

bors r+

@craig
Copy link
Contributor

craig bot commented Apr 5, 2018

Build failed

@RaduBerinde
Copy link
Member Author

bors r+

craig bot added a commit that referenced this pull request Apr 5, 2018
24517: cherrypick-2.0.1: sql: fix crash in physicalProps r=RaduBerinde a=RaduBerinde

The `addEquivalency` method wasn't properly handling the case when one
of the columns is constant. This causes the other column to become
constant, and thus it needs to be removed from all weak keys.

Adding a test designed to catch the general class of bugs where a
mutation causes the invariants to be invalidated; verified that it
catches the problem.

Fixes #24500.

Release note (bug fix): Fixed a crash caused by a WHERE condition that
requires a column to equal a specific value and at the same time equal
another column.

Cherrypick of PR #24506. CC @cockroachdb/release
@craig
Copy link
Contributor

craig bot commented Apr 5, 2018

Build succeeded

@craig craig bot merged commit b5554ee into cockroachdb:release-2.0 Apr 5, 2018
@RaduBerinde RaduBerinde deleted the phys-props-crash-2.0 branch April 5, 2018 19:38
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.

None yet

3 participants