-
Notifications
You must be signed in to change notification settings - Fork 702
Open
Labels
2024-tidb-docs-dashThis issue or PR is included in the 2024 TiDB Docs Dash event.This issue or PR is included in the 2024 TiDB Docs Dash event.area/sql-infraIndicates that the Issue or PR belongs to the area of sql-infra and sql-metadata.Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata.trackedThis issue has been tracked.This issue has been tracked.type/bugfixThis PR fixes a bug.This PR fixes a bug.
Description
Error Report
Please answer the following questions before submitting your issue. Thanks!
- What is the URL/path of the document related to this issue?
https://docs.pingcap.com/tidb/stable/auto-increment#restrictions
- How would you like to improve it?
The behavior of auto-increment is engine specific in MySQL. Although the mysql-compatibility page already documents that engine=XX is ignored, it is worth adding a note to the auto-increment page under "restrictions" to state this.
Here is an example to show the behavior difference:
CREATE TABLE animals (
grp ENUM('fish','mammal','bird') NOT NULL,
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (grp,id)
) ENGINE=MyISAM;
INSERT INTO animals (grp,name) VALUES
('mammal','dog'),('mammal','cat'),
('bird','penguin'),('fish','lax'),('mammal','whale'),
('bird','ostrich');
SELECT * FROM animals ORDER BY grp,id;
Metadata
Metadata
Assignees
Labels
2024-tidb-docs-dashThis issue or PR is included in the 2024 TiDB Docs Dash event.This issue or PR is included in the 2024 TiDB Docs Dash event.area/sql-infraIndicates that the Issue or PR belongs to the area of sql-infra and sql-metadata.Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata.trackedThis issue has been tracked.This issue has been tracked.type/bugfixThis PR fixes a bug.This PR fixes a bug.
Type
Projects
Status
No status