-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
infoschema: fix compatibility of auto_increment column value of INFORMATION_SCHEMA.TABLES #10207
Conversation
…MATION_SCHEMA.TABLES
Codecov Report
@@ Coverage Diff @@
## master #10207 +/- ##
===============================================
+ Coverage 81.2882% 81.759% +0.4707%
===============================================
Files 423 423
Lines 90387 92369 +1982
===============================================
+ Hits 73474 75520 +2046
+ Misses 11606 11544 -62
+ Partials 5307 5305 -2 |
infoschema/tables.go
Outdated
if err != nil { | ||
return 0, err | ||
} | ||
autoIncID, err := tbl.Allocator(ctx).NextGlobalAutoID(tblInfo.ID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use the nextAutoID in this autoid.allocator of this table, in the memory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But select table_name, auto_increment from NFORMATION_SCHEMA.TABLES
from different-tidb-server will got different value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
/run-all-tests tidb-test=pr/865 |
1 similar comment
/run-all-tests tidb-test=pr/865 |
/run-all-tests tidb-test=pr/865 |
1 similar comment
/run-all-tests tidb-test=pr/865 |
/run-all-tests tidb-test=pr/865 |
/run-unit-test tidb-test=pr/865 |
cherry pick to release-3.0 in PR #11413 |
What problem does this PR solve?
Fix compatibility of auto_increment column value of INFORMATION_SCHEMA.TABLES.
In MySQL:
In TiDB:
after This PR:
TiDB
What is changed and how it works?
Change
dataForTables
function.Check List
Tests
Code changes
Side effects
Related changes