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

stats: fix panic when fast analyze on empty table #13284

Merged
merged 3 commits into from
Nov 8, 2019

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Nov 8, 2019

What problem does this PR solve?

Fast analyze would panic when analyze on empty table.

What is changed and how it works?

Specially check if the result samples are empty.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Fix fast analyze panic when analyze empty tables.

@codecov
Copy link

codecov bot commented Nov 8, 2019

Codecov Report

Merging #13284 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #13284   +/-   ##
===========================================
  Coverage   80.2086%   80.2086%           
===========================================
  Files           469        469           
  Lines        111842     111842           
===========================================
  Hits          89707      89707           
  Misses        15231      15231           
  Partials       6904       6904

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

lgtm

@winoros winoros added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 8, 2019
Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

LGTM

@lzmhhh123 lzmhhh123 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 8, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 8, 2019

/run-all-tests

@sre-bot sre-bot merged commit 5737729 into pingcap:master Nov 8, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 8, 2019

cherry pick to release-3.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Nov 8, 2019

cherry pick to release-3.0 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/statistics status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants