Skip to content

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Sep 11, 2019

cherry-pick #12119 to release-3.0


What problem does this PR solve?

mysql 5.7 & mysql 8.0

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (pk BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY (pk));
INSERT INTO t1 VALUES (NULL), (18446744073709551615-1), (NULL);

ERROR 1467 (HY000): Failed to read auto-increment value from storage engine

tidb master

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (pk BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY (pk));
INSERT INTO t1 VALUES (NULL), (18446744073709551615-1), (NULL);

Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

What is changed and how it works?

Check the allocated value whether is the MaxUint64 or MaxInt64 before alloc.

Check List

Tests

  • mysql-test In CI
  • correlated mysql_tset PR #889

Related changes

  • Need to cherry-pick to the release branch

Release note

  • fix the MaxUint64 and MaxInt64 autoID should not allocated.

@sre-bot
Copy link
Contributor Author

sre-bot commented Sep 11, 2019

/run-all-tests

@AilinKid
Copy link
Contributor

/rebuild

@AilinKid
Copy link
Contributor

/rebuild

@AilinKid
Copy link
Contributor

/run-all-tests

@AilinKid
Copy link
Contributor

/run-all-tests tidb-test=pr/889

@AilinKid
Copy link
Contributor

/run-all-tests tidb-test=pr/893

@bb7133
Copy link
Member

bb7133 commented Sep 16, 2019

/run-all-tests tidb-test=pr/893

@AilinKid
Copy link
Contributor

/run-all-tests tidb-test=pr/895

@AilinKid
Copy link
Contributor

/rebuild

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

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@bb7133 bb7133 added the status/can-merge Indicates a PR has been approved by a committer. label Sep 16, 2019
@sre-bot
Copy link
Contributor Author

sre-bot commented Sep 16, 2019

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

@bb7133 bb7133 added the status/LGT2 Indicates that a PR has LGTM 2. label Sep 16, 2019
@winkyao winkyao merged commit 33db335 into pingcap:release-3.0 Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants