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

statistic: fix error when fast analyze on only indexes #15889

Merged
merged 6 commits into from
Apr 1, 2020

Conversation

lzmhhh123
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #15752

Problem Summary: in the fast sample, we use the wrong column info to build index value. When we only analyze indexes, the analyzing column infos is nil. Then we should use table info's columns to build index value.

What is changed and how it works?

What's Changed: change colInfos to tblInfo.Columns

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

@lzmhhh123 lzmhhh123 requested a review from a team as a code owner March 31, 2020 05:24
@ghost ghost requested review from wshwsh12 and removed request for a team March 31, 2020 05:24
@lzmhhh123 lzmhhh123 requested review from zz-jason, winoros, eurekaka and a team March 31, 2020 05:25
@ghost ghost removed their request for review March 31, 2020 05:25
@github-actions github-actions bot added the sig/execution SIG execution label Mar 31, 2020
@lzmhhh123 lzmhhh123 requested review from a team and removed request for wshwsh12 March 31, 2020 05:25
@ghost ghost removed their request for review March 31, 2020 05:25
@codecov
Copy link

codecov bot commented Mar 31, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@07194a0). Click here to learn what that means.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #15889   +/-   ##
===========================================
  Coverage          ?   80.5492%           
===========================================
  Files             ?        505           
  Lines             ?     135301           
  Branches          ?          0           
===========================================
  Hits              ?     108984           
  Misses            ?      17836           
  Partials          ?       8481

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 31, 2020
@lzmhhh123 lzmhhh123 added the priority/release-blocker This issue blocks a release. Please solve it ASAP. label Apr 1, 2020
francis0407
francis0407 previously approved these changes Apr 1, 2020
Copy link
Member

@francis0407 francis0407 left a comment

Choose a reason for hiding this comment

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

LGTM

@francis0407 francis0407 added the status/can-merge Indicates a PR has been approved by a committer. label Apr 1, 2020
@lzmhhh123
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Apr 1, 2020

Your auto merge job has been accepted, waiting for 15907, 15845, 15758, 15956, 15776

@sre-bot
Copy link
Contributor

sre-bot commented Apr 1, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 1, 2020

@lzmhhh123 merge failed.

@lzmhhh123
Copy link
Contributor Author

/run-sqllogic-test

@lzmhhh123
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Apr 1, 2020

Your auto merge job has been accepted, waiting for 15955, 15860, 15868, 15907, 15956

@sre-bot
Copy link
Contributor

sre-bot commented Apr 1, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 1, 2020

@lzmhhh123 merge failed.

@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented Apr 1, 2020

/run-check_dev_2

@lzmhhh123 lzmhhh123 merged commit 5d846cf into pingcap:master Apr 1, 2020
@lzmhhh123 lzmhhh123 deleted the bug-fix/fast_sample_error branch April 1, 2020 10:51
sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Apr 1, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Apr 1, 2020

cherry pick to release-3.0 in PR #15967

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Apr 1, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Apr 1, 2020

cherry pick to release-3.1 in PR #15968

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Apr 1, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Apr 1, 2020

cherry pick to release-4.0 in PR #15969

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/statistics priority/release-blocker This issue blocks a release. Please solve it ASAP. sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ANALYZE TABLE results in "invalid encoded key" with tidb_enable_fast_analyze=1
6 participants