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

meta/autoid : fix the issue that MaxUint64 and MaxInt64 autoID is incorrectly allocated (#12119) #12162

Merged
merged 16 commits into from Sep 16, 2019

Conversation

@sre-bot
Copy link

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

This comment has been minimized.

Copy link
Author

commented Sep 11, 2019

/run-all-tests

@AilinKid

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

/rebuild

@AilinKid

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

/rebuild

@AilinKid

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

/run-all-tests

@AilinKid

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

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

@AilinKid

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

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

@bb7133

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

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

@AilinKid

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

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

@AilinKid

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

/rebuild

Copy link
Contributor

left a comment

LGTM

@bb7133
bb7133 approved these changes Sep 16, 2019
Copy link
Contributor

left a comment

LGTM

@sre-bot

This comment has been minimized.

Copy link
Author

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 label Sep 16, 2019
@winkyao winkyao merged commit 33db335 into pingcap:release-3.0 Sep 16, 2019
13 checks passed
13 checks passed
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev_2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/common-test job succeeded
Details
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/mybatis-test job succeeded
Details
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.