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
I scan the official web page about the 'Modify Column' and find no compatible statement about not supporting 'set auto_increment' of 'Modify column'
But the following behavior of 'modify column' SQL is not consistent for mysql and tidb:
#Server version: 5.7.38-log Source distribution mysql> create table t2(id int key); Query OK, 0 rows affected (0.29 sec) mysql> alter table t2 modify column `id` bigint(20) not null auto_increment; Query OK, 0 rows affected, 1 warning (0.29 sec) Records: 0 Duplicates: 0 Warnings: 1 mysql> show create table t2; +-------+---------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+---------------------------------------------------------------------------------------------------------------------------------------------+ | t2 | CREATE TABLE `t2` ( `id` bigint NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin | +-------+---------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.23 sec)
*TIDB:
#Server version: 5.7.25-TiDB-v6.3.0-alpha-1105-g20bb0464e TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible mysql> create table t2(id int key); Query OK, 0 rows affected (0.17 sec) mysql> alter table t2 modify column `id` bigint(20) not null auto_increment; ERROR 8200 (HY000): Unsupported modify column: can't set auto_increment
The text was updated successfully, but these errors were encountered:
limited by:
Sorry, something went wrong.
See also: #39143
No branches or pull requests
General Question
I scan the official web page about the 'Modify Column' and find no compatible statement about not supporting 'set auto_increment' of 'Modify column'
But the following behavior of 'modify column' SQL is not consistent for mysql and tidb:
*TIDB:
The text was updated successfully, but these errors were encountered: