We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
CREATE TABLE `Test` ( `id` INTEGER PRIMARY KEY, `authorId` INTEGER AUTO_INCREMENT UNIQUE );
The unique key name generated by MySQL is authorId.
authorId
MySQL root@127.0.0.1:test2> show create table `Test2`\G ***************************[ 1. row ]*************************** Table | Test2 Create Table | CREATE TABLE `Test2` ( `id` int(11) NOT NULL, `authorId` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), UNIQUE KEY `authorId` (`authorId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
The unique key name generated by TiDB is authorid.
authorid
metadata_for_mysql_should_work> show create table `Test`\G ***************************[ 1. row ]*************************** Table | Test Create Table | CREATE TABLE `Test` ( `id` int(11) NOT NULL, `authorId` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, UNIQUE KEY `authorid` (`authorId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin 1 row in set Time: 0.003s
metadata_for_mysql_should_work> select tidb_version()\G ***************************[ 1. row ]*************************** tidb_version() | Release Version: v6.3.0 Edition: Community Git Commit Hash: ecd67531f1721d3e49eb15a202ac7c0ae02291ec Git Branch: heads/refs/tags/v6.3.0 UTC Build Time: 2022-09-23 14:21:08 GoVersion: go1.19.1 Race Enabled: false TiKV Min Version: 6.2.0-alpha Check Table Before Drop: false Store: tikv 1 row in set Time: 0.002s
The text was updated successfully, but these errors were encountered:
/assign
Sorry, something went wrong.
ddl: modify default unique index name (#39145)
661a6b6
close #39080
wxbty
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
The unique key name generated by MySQL is
authorId
.3. What did you see instead (Required)
The unique key name generated by TiDB is
authorid
.4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: