Unable to set AUTO_ID_CACHE of the table to 1

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 无法将表的AUTO_ID_CACHE设置1

| username: beebol

[TiDB Usage Environment] Production Environment
[TiDB Version] v7.1.0
[Reproduction Path]

root 14:58:  [mgboss]>  alter table asset_app AUTO_ID_CACHE 2;
Query OK, 0 rows affected (0.17 sec)

root 14:58:  [mgboss]>  alter table asset_app AUTO_ID_CACHE 1;
ERROR 1105 (HY000): Can't Alter AUTO_ID_CACHE between 1 and non-1, the underlying implementation is different
| username: Kongdom | Original post link

Only supported when setting up the table.

| username: beebol | Original post link

Version 5.3.0 supports altering to 1. Can I set it to 1 in version 5.3.0 and then upgrade the TiDB version to v7.1.0?

| username: Kongdom | Original post link

This should have been the case since version 6.4, after all, they are two different modes.

| username: beebol | Original post link

Is my upgrade OK?

| username: Kongdom | Original post link

Based on the description, it seems possible, but I haven’t practiced it myself. You can try it out in a test environment.

The meaning of setting 1 is the same across different versions, but the handling method is different.

| username: mono | Original post link

This should be the correct approach. The official documentation has already introduced it, and the implementation method has changed.

| username: zhanggame1 | Original post link

The meaning is the same, but the performance is unknown how many times worse. Decentralized allocation results in super slow insertion speed.

| username: redgame | Original post link

The implementation of AUTO_ID_CACHE varies depending on the table’s storage engine.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.