![](https://secure.gravatar.com/avatar/39b623a1559cf9c69ac3d9d4fb44e7fe.jpg?s=120&d=mm&r=g)
4 Feb
2019
4 Feb
'19
10:34 p.m.
Hi, Eugene! On Feb 04, Eugene Kosov wrote:
create table t1 (a int unique); insert t1 values (NULL),(NULL),(NULL); alter table t1 modify a int auto_increment;
create table t1 (a int not null, unique key a_key (a)) engine=innodb; insert into t1 values (19), (1), (100500); alter table t1 modify a int not null auto_increment,algorithm=instant; drop table t1;
You've missed the point. I wrote that in some cases ALTER TABLE has to generate auto-increment values. Try this example: create table t1 (a int not null, index (a)); insert t1 values (0),(0),(0); alter table t1 modify a int auto_increment; select * from t1; Regards, Sergei Chief Architect MariaDB and security@mariadb.org