payload: {"action":"created","comment":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/comments/362739475","pull_request_review_id":337991561,"id":362739475,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2MjczOTQ3NQ==","diff_hunk":"@@ -20,11 +20,12 @@ import (\n \n // Error instances.\n var (\n-\terrInvalidTableID       = terror.ClassAutoid.New(mysql.ErrInvalidTableID, mysql.MySQLErrName[mysql.ErrInvalidTableID])\n-\tErrAutoincReadFailed    = terror.ClassAutoid.New(mysql.ErrAutoincReadFailed, mysql.MySQLErrName[mysql.ErrAutoincReadFailed])\n-\tErrWrongAutoKey         = terror.ClassAutoid.New(mysql.ErrWrongAutoKey, mysql.MySQLErrName[mysql.ErrWrongAutoKey])\n-\terrInvalidAllocatorType = terror.ClassAutoid.New(mysql.ErrUnknownAllocatorType, mysql.MySQLErrName[mysql.ErrUnknownAllocatorType])\n-\tErrAutoRandReadFailed   = terror.ClassAutoid.New(mysql.ErrAutoRandReadFailed, mysql.MySQLErrName[mysql.ErrAutoRandReadFailed])\n+\terrInvalidTableID            = terror.ClassAutoid.New(mysql.ErrInvalidTableID, mysql.MySQLErrName[mysql.ErrInvalidTableID])\n+\terrInvalidIncrementAndOffset = terror.ClassAutoid.New(mysql.ErrInvalidIncrementAndOffset, mysql.MySQLErrName[mysql.ErrInvalidIncrementAndOffset])\n+\tErrAutoincReadFailed         = terror.ClassAutoid.New(mysql.ErrAutoincReadFailed, mysql.MySQLErrName[mysql.ErrAutoincReadFailed])\n+\tErrWrongAutoKey              = terror.ClassAutoid.New(mysql.ErrWrongAutoKey, mysql.MySQLErrName[mysql.ErrWrongAutoKey])\n+\terrInvalidAllocatorType      = terror.ClassAutoid.New(mysql.ErrUnknownAllocatorType, mysql.MySQLErrName[mysql.ErrUnknownAllocatorType])\n+\tErrAutoRandReadFailed        = terror.ClassAutoid.New(mysql.ErrAutoRandReadFailed, mysql.MySQLErrName[mysql.ErrAutoRandReadFailed])\n )\n \n func init() {","path":"meta/autoid/errors.go","position":17,"original_position":17,"commit_id":"6dba49685cc9595d930c78a202b90b657bcd3cc1","original_commit_id":"6dba49685cc9595d930c78a202b90b657bcd3cc1","user":{"login":"AilinKid","id":15825830,"node_id":"MDQ6VXNlcjE1ODI1ODMw","avatar_url":"https://avatars2.githubusercontent.com/u/15825830?v=4","gravatar_id":"","url":"https://api.github.com/users/AilinKid","html_url":"https://github.com/AilinKid","followers_url":"https://api.github.com/users/AilinKid/followers","following_url":"https://api.github.com/users/AilinKid/following{/other_user}","gists_url":"https://api.github.com/users/AilinKid/gists{/gist_id}","starred_url":"https://api.github.com/users/AilinKid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AilinKid/subscriptions","organizations_url":"https://api.github.com/users/AilinKid/orgs","repos_url":"https://api.github.com/users/AilinKid/repos","events_url":"https://api.github.com/users/AilinKid/events{/privacy}","received_events_url":"https://api.github.com/users/AilinKid/received_events","type":"User","site_admin":false},"body":"Good catch!","created_at":"2020-01-03T09:02:34Z","updated_at":"2020-01-03T09:02:35Z","html_url":"https://github.com/pingcap/tidb/pull/14301#discussion_r362739475","pull_request_url":"https://api.github.com/repos/pingcap/tidb/pulls/14301","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/comments/362739475"},"html":{"href":"https://github.com/pingcap/tidb/pull/14301#discussion_r362739475"},"pull_request":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/14301"}},"in_reply_to_id":362710715},"pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/14301","id":358324125,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU4MzI0MTI1","html_url":"https://github.com/pingcap/tidb/pull/14301","diff_url":"https://github.com/pingcap/tidb/pull/14301.diff","patch_url":"https://github.com/pingcap/tidb/pull/14301.patch","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/14301","number":14301,"state":"open","locked":false,"title":"Meta: Support auto_increment_increment & auto_increment_offset.","user":{"login":"AilinKid","id":15825830,"node_id":"MDQ6VXNlcjE1ODI1ODMw","avatar_url":"https://avatars2.githubusercontent.com/u/15825830?v=4","gravatar_id":"","url":"https://api.github.com/users/AilinKid","html_url":"https://github.com/AilinKid","followers_url":"https://api.github.com/users/AilinKid/followers","following_url":"https://api.github.com/users/AilinKid/following{/other_user}","gists_url":"https://api.github.com/users/AilinKid/gists{/gist_id}","starred_url":"https://api.github.com/users/AilinKid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AilinKid/subscriptions","organizations_url":"https://api.github.com/users/AilinKid/orgs","repos_url":"https://api.github.com/users/AilinKid/repos","events_url":"https://api.github.com/users/AilinKid/events{/privacy}","received_events_url":"https://api.github.com/users/AilinKid/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you for contributing to TiDB! Please read TiDB's [CONTRIBUTING](https://github.com/pingcap/community/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.\r\n-->\r\n\r\n### What problem does this PR solve? <!--add issue link with summary if exists-->\r\nFix #14245 \r\nSupport auto_increment_increment & auto_increment_offset.\r\n\r\n### What is changed and how it works?\r\n1. Add increment&offset variable modify support.\r\n2. Take increment & offset into allocate consideration.\r\n3. Check MySQL doc and valid the range of these two variables.\r\n4. Attach more tests to increment&offset allocation logic.\r\n\r\n### Check List <!--REMOVE the items that are not applicable-->\r\n\r\nTests <!-- At least one of them must be included. -->\r\n\r\n - Unit test\r\n - Integration test\r\n\r\nCode changes\r\n\r\n - Has exported function/method change\r\nfunc CalcNeededIDs(base, n, increment, offset int64, isUnsigned bool) int64 \r\n - Has interface methods change\r\nAlloc(tableID int64, n uint64, increment, offset int64) (int64, int64, error)\r\n\r\n\r\nRelated changes\r\n\r\n - Need to update the documentation\r\n\r\nRelease note\r\n\r\n - Support auto_increment_increment & auto_increment_offset.\r\n","created_at":"2019-12-31T10:10:52Z","updated_at":"2020-01-03T09:02:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bec530132924159b6df65f8f0d0634a318fb59b1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":745133021,"node_id":"MDU6TGFiZWw3NDUxMzMwMjE=","url":"https://api.github.com/repos/pingcap/tidb/labels/component/DDL-need-LGT3","name":"component/DDL-need-LGT3","color":"00bff4","default":false,"description":""},{"id":1144191230,"node_id":"MDU6TGFiZWwxMTQ0MTkxMjMw","url":"https://api.github.com/repos/pingcap/tidb/labels/type/new-feature","name":"type/new-feature","color":"c8f298","default":false,"description":""}],"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/tidb/pulls/14301/commits","review_comments_url":"https://api.github.com/repos/pingcap/tidb/pulls/14301/comments","review_comment_url":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/14301/comments","statuses_url":"https://api.github.com/repos/pingcap/tidb/statuses/6dba49685cc9595d930c78a202b90b657bcd3cc1","head":{"label":"AilinKid:autoid_step","ref":"autoid_step","sha":"6dba49685cc9595d930c78a202b90b657bcd3cc1","user":{"login":"AilinKid","id":15825830,"node_id":"MDQ6VXNlcjE1ODI1ODMw","avatar_url":"https://avatars2.githubusercontent.com/u/15825830?v=4","gravatar_id":"","url":"https://api.github.com/users/AilinKid","html_url":"https://github.com/AilinKid","followers_url":"https://api.github.com/users/AilinKid/followers","following_url":"https://api.github.com/users/AilinKid/following{/other_user}","gists_url":"https://api.github.com/users/AilinKid/gists{/gist_id}","starred_url":"https://api.github.com/users/AilinKid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AilinKid/subscriptions","organizations_url":"https://api.github.com/users/AilinKid/orgs","repos_url":"https://api.github.com/users/AilinKid/repos","events_url":"https://api.github.com/users/AilinKid/events{/privacy}","received_events_url":"https://api.github.com/users/AilinKid/received_events","type":"User","site_admin":false},"repo":{"id":194860545,"node_id":"MDEwOlJlcG9zaXRvcnkxOTQ4NjA1NDU=","name":"tidb","full_name":"AilinKid/tidb","private":false,"owner":{"login":"AilinKid","id":15825830,"node_id":"MDQ6VXNlcjE1ODI1ODMw","avatar_url":"https://avatars2.githubusercontent.com/u/15825830?v=4","gravatar_id":"","url":"https://api.github.com/users/AilinKid","html_url":"https://github.com/AilinKid","followers_url":"https://api.github.com/users/AilinKid/followers","following_url":"https://api.github.com/users/AilinKid/following{/other_user}","gists_url":"https://api.github.com/users/AilinKid/gists{/gist_id}","starred_url":"https://api.github.com/users/AilinKid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AilinKid/subscriptions","organizations_url":"https://api.github.com/users/AilinKid/orgs","repos_url":"https://api.github.com/users/AilinKid/repos","events_url":"https://api.github.com/users/AilinKid/events{/privacy}","received_events_url":"https://api.github.com/users/AilinKid/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AilinKid/tidb","description":"TiDB is a distributed HTAP database compatible with the MySQL protocol ","fork":true,"url":"https://api.github.com/repos/AilinKid/tidb","forks_url":"https://api.github.com/repos/AilinKid/tidb/forks","keys_url":"https://api.github.com/repos/AilinKid/tidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AilinKid/tidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AilinKid/tidb/teams","hooks_url":"https://api.github.com/repos/AilinKid/tidb/hooks","issue_events_url":"https://api.github.com/repos/AilinKid/tidb/issues/events{/number}","events_url":"https://api.github.com/repos/AilinKid/tidb/events","assignees_url":"https://api.github.com/repos/AilinKid/tidb/assignees{/user}","branches_url":"https://api.github.com/repos/AilinKid/tidb/branches{/branch}","tags_url":"https://api.github.com/repos/AilinKid/tidb/tags","blobs_url":"https://api.github.com/repos/AilinKid/tidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AilinKid/tidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AilinKid/tidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/AilinKid/tidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AilinKid/tidb/statuses/{sha}","languages_url":"https://api.github.com/repos/AilinKid/tidb/languages","stargazers_url":"https://api.github.com/repos/AilinKid/tidb/stargazers","contributors_url":"https://api.github.com/repos/AilinKid/tidb/contributors","subscribers_url":"https://api.github.com/repos/AilinKid/tidb/subscribers","subscription_url":"https://api.github.com/repos/AilinKid/tidb/subscription","commits_url":"https://api.github.com/repos/AilinKid/tidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/AilinKid/tidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/AilinKid/tidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/AilinKid/tidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/AilinKid/tidb/contents/{+path}","compare_url":"https://api.github.com/repos/AilinKid/tidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AilinKid/tidb/merges","archive_url":"https://api.github.com/repos/AilinKid/tidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AilinKid/tidb/downloads","issues_url":"https://api.github.com/repos/AilinKid/tidb/issues{/number}","pulls_url":"https://api.github.com/repos/AilinKid/tidb/pulls{/number}","milestones_url":"https://api.github.com/repos/AilinKid/tidb/milestones{/number}","notifications_url":"https://api.github.com/repos/AilinKid/tidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AilinKid/tidb/labels{/name}","releases_url":"https://api.github.com/repos/AilinKid/tidb/releases{/id}","deployments_url":"https://api.github.com/repos/AilinKid/tidb/deployments","created_at":"2019-07-02T12:39:33Z","updated_at":"2019-07-11T06:19:40Z","pushed_at":"2020-01-02T08:44:29Z","git_url":"git://github.com/AilinKid/tidb.git","ssh_url":"git@github.com:AilinKid/tidb.git","clone_url":"https://github.com/AilinKid/tidb.git","svn_url":"https://github.com/AilinKid/tidb","homepage":"https://pingcap.com","size":97926,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"5d76de903a6d2c95f83da365e5d757dad9fb9e7b","user":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":41986369,"node_id":"MDEwOlJlcG9zaXRvcnk0MTk4NjM2OQ==","name":"tidb","full_name":"pingcap/tidb","private":false,"owner":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pingcap/tidb","description":"TiDB is an open source distributed HTAP database compatible with the MySQL protocol ","fork":false,"url":"https://api.github.com/repos/pingcap/tidb","forks_url":"https://api.github.com/repos/pingcap/tidb/forks","keys_url":"https://api.github.com/repos/pingcap/tidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/tidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/tidb/teams","hooks_url":"https://api.github.com/repos/pingcap/tidb/hooks","issue_events_url":"https://api.github.com/repos/pingcap/tidb/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/tidb/events","assignees_url":"https://api.github.com/repos/pingcap/tidb/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/tidb/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/tidb/tags","blobs_url":"https://api.github.com/repos/pingcap/tidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/tidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/tidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/tidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/tidb/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/tidb/languages","stargazers_url":"https://api.github.com/repos/pingcap/tidb/stargazers","contributors_url":"https://api.github.com/repos/pingcap/tidb/contributors","subscribers_url":"https://api.github.com/repos/pingcap/tidb/subscribers","subscription_url":"https://api.github.com/repos/pingcap/tidb/subscription","commits_url":"https://api.github.com/repos/pingcap/tidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/tidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/tidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/tidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/tidb/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/tidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/tidb/merges","archive_url":"https://api.github.com/repos/pingcap/tidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/tidb/downloads","issues_url":"https://api.github.com/repos/pingcap/tidb/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/tidb/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/tidb/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/tidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/tidb/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/tidb/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/tidb/deployments","created_at":"2015-09-06T04:01:52Z","updated_at":"2020-01-03T08:52:16Z","pushed_at":"2020-01-03T08:28:03Z","git_url":"git://github.com/pingcap/tidb.git","ssh_url":"git@github.com:pingcap/tidb.git","clone_url":"https://github.com/pingcap/tidb.git","svn_url":"https://github.com/pingcap/tidb","homepage":"https://pingcap.com","size":153089,"stargazers_count":22141,"watchers_count":22141,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3339,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1265,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3339,"open_issues":1265,"watchers":22141,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/14301"},"html":{"href":"https://github.com/pingcap/tidb/pull/14301"},"issue":{"href":"https://api.github.com/repos/pingcap/tidb/issues/14301"},"comments":{"href":"https://api.github.com/repos/pingcap/tidb/issues/14301/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/14301/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/14301/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/tidb/statuses/6dba49685cc9595d930c78a202b90b657bcd3cc1"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"AilinKid"}}