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 COPY internal error in optimizer #87175

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

cucaroach
Copy link
Contributor

@cucaroach cucaroach commented Aug 31, 2022

Statistics builder code to evaluate distinct count had a typo and would
crash if there were more rows than columns. Fix bug and rewrite to be a
little clearer.

Fixes: #87011

Release justification: low-risk high priority fix to new funcationality
Release note: None

@cucaroach cucaroach requested a review from a team as a code owner August 31, 2022 13:26
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Statistics builder code to evaluate distinct count had a typo and would
crash if there were more rows than columns.  Fix bug and rewrite to be a
little clearer.

Fixes: cockroachdb#87011

Release justification: low-risk high priority fix to new funcationality
Release note: None
Copy link
Collaborator

@mgartner mgartner left a comment

Choose a reason for hiding this comment

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

Nice find! :lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @cucaroach)

@cucaroach
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 1, 2022

Build succeeded:

@craig craig bot merged commit 9911916 into cockroachdb:master Sep 1, 2022
@cucaroach cucaroach deleted the fix-copy-crash branch September 1, 2022 17:14
@cucaroach cucaroach restored the fix-copy-crash branch November 11, 2022 18:49
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: COPY into table with foreign key causes internal error
3 participants