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

release-2.1: opt: fix issue with dangling pointer in statisticsBuilder #38075

Merged
merged 1 commit into from
Jun 7, 2019

Conversation

rytaft
Copy link
Collaborator

@rytaft rytaft commented Jun 6, 2019

Backport 1/1 commits from #37983.

/cc @cockroachdb/release


This commit fixes an issue where the statisticsBuilder was using
an invalid pointer to update statistics for some multi-column stats
in the local table statistics cache. The fix is to re-fetch the
pointer to the stats just before updating them, in case the
previously fetched address is no longer valid.

This problem is very hard to reproduce, so I had to use the somewhat
complex query from the issue for a regression test.

Fixes #37953

Release note: None

This commit fixes an issue where the statisticsBuilder was using
an invalid pointer to update statistics for some multi-column stats
in the local table statistics cache. The fix is to re-fetch the
pointer to the stats just before updating them, in case the
previously fetched address is no longer valid.

This problem is very hard to reproduce, so I had to use the somewhat
complex query from the issue for a regression test.

Fixes cockroachdb#37953

Release note: None
@rytaft rytaft requested a review from a team as a code owner June 6, 2019 20:02
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rytaft rytaft merged commit e77445a into cockroachdb:release-2.1 Jun 7, 2019
@rytaft rytaft deleted the backport2.1-37983 branch June 7, 2019 19:02
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.

3 participants