-
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
Updating rows by auto_increment id cause id increasing dramatically #7422
Comments
It is expected. You can refer the docs here /~https://github.com/pingcap/docs/blob/master/sql/mysql-compatibility.md#auto-increment-id. |
@lamxTyler Thanks for the reply. The doc only specifies that user should not add custom id when insert. However, this case is caused by updating to existed rows. |
Thanks for your report, @lerencao ! |
@jackysp It wastes too many ranges, and the id increasing speed is amplified |
We will consider your suggestion, @lerencao . |
Thanks for consideration on this. :) Looking forward for the further plan. |
Awesome! |
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
What did you expect to see?
Expected id of
insert into t1(b) values(3)
is2
.What did you see instead?
id of
insert into t1(b) values(3)
is60001
.It seems that when check back to first tidb-server, do update to row of id
30001
, tidb rebased it autoid, and next insert id increasing dramatically.I don't know it's expected, so issued here.
What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?v2.0.6, commit: b13bc08
The text was updated successfully, but these errors were encountered: