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 the error message of too long key (#15127) #15130

Merged
merged 3 commits into from
Mar 11, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Mar 4, 2020

cherry-pick #15127 to release-3.0


What problem does this PR solve?

Set max-index-length = 12288
Before this PR:

tidb> create table t1 (a varchar(3073) primary key);
ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytes

After this PR:

tidb> create table t1 (a varchar(3073) primary key);
ERROR 1071 (42000): Specified key was too long; max key length is 12288 bytes

What is changed and how it works?

Fill index length in errTooLongKey after loading configure.

Check List

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Fix the value of the max key length in the error message of ErrTooLongKey

Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor Author

sre-bot commented Mar 4, 2020

/run-all-tests

ddl/ddl.go Outdated Show resolved Hide resolved
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

LGTM

@tangenta tangenta added the status/can-merge Indicates a PR has been approved by a committer. label Mar 11, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Mar 11, 2020

Sorry @tangenta, you don't have permission to trigger auto merge event on this branch.

@tangenta tangenta removed the status/can-merge Indicates a PR has been approved by a committer. label Mar 11, 2020
@jackysp
Copy link
Member

jackysp commented Mar 11, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 11, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Mar 11, 2020

/run-all-tests

@sre-bot sre-bot merged commit 90012b9 into pingcap:release-3.0 Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants