Auto-inc docs should describe behavior as InnoDB-like
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 617
- Forks
- 724
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 223
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;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked auto-increment documentation and its Restrictions section, then compare the existing mysql-compatibility page and the supplied SQL example. Done means the auto-increment page clearly notes the engine-specific behavior and its relationship to TiDB's compatibility behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, sql
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100