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

ddl: fix secondary index len check for clustered index #23710

Merged
merged 14 commits into from
Apr 1, 2021
Merged

ddl: fix secondary index len check for clustered index #23710

merged 14 commits into from
Apr 1, 2021

Conversation

lysu
Copy link
Contributor

@lysu lysu commented Mar 30, 2021

What problem does this PR solve?

Issue Number: close #23631

Problem Summary:

What is changed and how it works?

What's Changed, How it Works:

calculate non-unique secondary index len = pk len + index len

when

  • create table
  • create index
  • change column len for index
  • change column len for pk

Related changes

  • Need to cherry-pick to the release branch 5.0
  • Need update document

Check List

Tests

  • Unit test

Side effects

  • n/a

Release note

  • No release note

This change is Reviewable

@lysu lysu added the type/bugfix This PR fixes a bug. label Mar 30, 2021
@ti-chi-bot ti-chi-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 30, 2021
@lysu
Copy link
Contributor Author

lysu commented Mar 30, 2021

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Mar 30, 2021

/rebuild

@lysu lysu marked this pull request as ready for review March 30, 2021 14:50
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 30, 2021
@github-actions github-actions bot added the sig/sql-infra SIG: SQL Infra label Mar 30, 2021
@zhouqiang-cl
Copy link
Contributor

/run_check_dev_2

1 similar comment
@lysu
Copy link
Contributor Author

lysu commented Mar 30, 2021

/run_check_dev_2

@lysu lysu added this to the v5.0.0 ga milestone Mar 30, 2021
@lysu
Copy link
Contributor Author

lysu commented Mar 30, 2021

/run-all-tests

@lysu lysu requested a review from zimulala March 31, 2021 01:50
@lysu
Copy link
Contributor Author

lysu commented Mar 31, 2021

@zimulala @tangenta @wjhuang2016 PTAL if free, we need cherry-pick this to 5.0 today

ddl/index.go Outdated Show resolved Hide resolved
ddl/index.go Outdated Show resolved Hide resolved
@lysu lysu requested a review from zimulala March 31, 2021 04:55
@tangenta
Copy link
Contributor

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 31, 2021
ddl/ddl_api.go Outdated Show resolved Hide resolved
ddl/index.go Outdated Show resolved Hide resolved
@lysu
Copy link
Contributor Author

lysu commented Mar 31, 2021

/run-all-tests

1 similar comment
@lysu
Copy link
Contributor Author

lysu commented Mar 31, 2021

/run-all-tests

@lysu lysu requested a review from zimulala March 31, 2021 14:24
@lysu
Copy link
Contributor Author

lysu commented Mar 31, 2021

/run-unit-test

1 similar comment
@lysu
Copy link
Contributor Author

lysu commented Mar 31, 2021

/run-unit-test

ddl/index.go Outdated Show resolved Hide resolved
@lysu lysu requested a review from wjhuang2016 March 31, 2021 15:36
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 1, 2021
@lysu lysu requested a review from tangenta April 1, 2021 11:02
@lysu
Copy link
Contributor Author

lysu commented Apr 1, 2021

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Apr 1, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: fd3fb3e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 1, 2021
@lysu
Copy link
Contributor Author

lysu commented Apr 1, 2021

/run-tics-test

@lysu
Copy link
Contributor Author

lysu commented Apr 1, 2021

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Apr 1, 2021

/run-all-tests

@ti-chi-bot ti-chi-bot merged commit 91bcb21 into pingcap:master Apr 1, 2021
@lysu lysu deleted the dev-add-index-check branch April 1, 2021 13:03
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Apr 1, 2021
@ti-srebot
Copy link
Contributor

cherry pick to release-5.0 in PR #23811

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-5.0 priority/release-blocker This issue blocks a release. Please solve it ASAP. sig/sql-infra SIG: SQL Infra size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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.

Non-unique index key may exceed default key size limit of tikv when using clustered index
7 participants