Skip to content

Commit

Permalink
AUTO_INCREMENT: MySQL compatibility mode GA (pingcap#11249)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreoxmt authored Dec 2, 2022
1 parent 5405c47 commit 85487d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions auto-increment.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ For performance reasons, `AUTO_INCREMENT` numbers are allocated in a batch of va

> **Note:**
>
> If you want the `AUTO_INCREMENT` numbers to be monotonic on all TiDB servers and your TiDB version is v6.4.0 or later, you can enable the [MySQL compatibility mode](#mysql-compatibility-mode) which is an experimental feature introduced in v6.4.0.
> If you want the `AUTO_INCREMENT` numbers to be monotonic on all TiDB servers and your TiDB version is v6.5.0 or later, it is recommended to enable the [MySQL compatibility mode](#mysql-compatibility-mode).
The following is a basic example of `AUTO_INCREMENT`:

Expand Down Expand Up @@ -355,10 +355,6 @@ The value (ID) implicitly assigned to auto-increment columns satisfies the follo

TiDB v6.4.0 introduces a centralized auto-increment ID allocating service. In each request, an auto-increment ID is allocated from this service instead of caching data in TiDB instances.

> **Warning:**
>
> This is still an experimental feature. It is **NOT** recommended that you use it in the production environment.
Currently, the centralized allocating service is in the TiDB process and works like DDL Owner. One TiDB instance allocates IDs as the primary node and other TiDB instances work as secondary nodes. To ensure high availability, when the primary instance fails, TiDB starts automatic failover.

To use the MySQL compatibility mode, you can set `AUTO_ID_CACHE` to `1` when creating a table:
Expand Down
1 change: 0 additions & 1 deletion experimental-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Elastic scheduling feature. It enables the TiDB cluster to dynamically scale out
+ [Range INTERVAL partitioning](/partitioned-table.md#range-interval-partitioning) (Introduced in v6.3.0)
+ [Add index acceleration](/system-variables.md#tidb_ddl_enable_fast_reorg-new-in-v630) (Introduced in v6.3.0)
+ [Restore a cluster to a specific point in time using the `FLASHBACK CLUSTER TO TIMESTAMP` syntax](/sql-statements/sql-statement-flashback-to-timestamp.md) (Introduced in v6.4.0)
+ [`AUTO_INCREMENT` MySQL compatibility mode](/auto-increment.md#mysql-compatibility-mode) (Introduced in v6.4.0)

## Storage

Expand Down

0 comments on commit 85487d9

Please sign in to comment.