pingcap / pingcap/tidb

Default value of `auto_id_cache` per TiDB Server

Open
#56,667 2 comments 0 reactions 0 assignees View on GitHub
compatibility-mysql80 type/compatibility type/feature-request type/usability
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Feature Request

**Is your feature request related to a problem? Please describe:**
Users migrate from MySQL to TiDB who expect auto_increment value increases monotonic, they prefer `auto_id_cache = 1`. To make use of this change, they need to update DDL statements manually to reflect `auto_id_cache = 1`.

**Describe the feature you'd like:**
Add sysvar to set TiDB server level default `auto_id_cache` value. This default value can be 30000. That does not change the current behavior. When this `auto_id_cache` sysvar changed to 1, auto_id_cache value for coming DDL will respect this value. while the DDL has set auto_id_cache value explicitly, auto_id_cache value in the DDL should be used.

**Describe alternatives you've considered:**
Rewrite DDL statements manually.

**Teachability, Documentation, Adoption, Migration Strategy:**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.