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

TiDB should use separated Allocators for the auto_increment column value and the row ID #982

Closed
zimulala opened this issue Mar 16, 2016 · 7 comments · Fixed by #39041
Closed
Assignees
Labels
sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.

Comments

@zimulala
Copy link
Contributor

zimulala commented Mar 16, 2016

execute SQL statements as follows:

create table t (c int auto_increment, key(c));
insert into t values();
insert into t values();
select * from t;

tidb result:

+---+
| c |
+---+
| 1 |
| 3 |
+---+

mysql result:

+---+
| c |
+---+
| 1 |
| 2 |
+---+
@coocood coocood changed the title Table uses a Allocator to allocate the auto_increment column value and the row ID Table uses a single Allocator to allocate the auto_increment column value and the row ID Oct 13, 2016
@morgo morgo added the type/enhancement The issue or PR belongs to an enhancement. label Oct 28, 2018
@morgo
Copy link
Contributor

morgo commented Oct 28, 2018

For now, Auto_increment behavior in TiDB is documented as incompatible with MySQL.

@tisonkun
Copy link
Contributor

@zimulala shall this issue be closed?

@tisonkun
Copy link
Contributor

well I can see that #20708 is trying to fix this.

@bb7133
Copy link
Member

bb7133 commented Aug 9, 2021

This behavior was by-designed and I do not treat it as a bug, change it to 'enhancement' and track in #20708

@bb7133 bb7133 closed this as completed Aug 9, 2021
@ti-srebot

This comment has been minimized.

@bb7133 bb7133 reopened this Aug 9, 2021
@bb7133 bb7133 added the type/enhancement The issue or PR belongs to an enhancement. label Aug 9, 2021
@bb7133 bb7133 changed the title Table uses a single Allocator to allocate the auto_increment column value and the row ID TiDB should use separated Allocators for the auto_increment column value and the row ID Aug 9, 2021
@tisonkun tisonkun removed the type/bug The issue is confirmed as a bug. label Aug 9, 2021
@dragonly
Copy link
Contributor

This can be reproduced in v5.3.0-alpha-1660-gdac5a6874.

@tangenta
Copy link
Contributor

@dragonly The last PR is still not merged. So the behavior is expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment