173
169
create table t1 (a bigint);
174
170
insert into t1 values (1), (2), (3), (0), (0);
175
172
alter table t1 modify a bigint not null auto_increment primary key;
179
176
# We still should be able to preserve zero in NO_AUTO_VALUE_ON_ZERO mode
181
#insert into t1 values (0), (1), (2), (3);
178
insert into t1 values (0), (1), (2), (3);
186
180
# Bug314567 - ALTER TABLE causes auto_increment resequencing,
187
181
# resulting in duplicate entry since sql_mode=NO_AUTO_VALUE_ON_ZERO
195
190
# It also sensible to preserve zeroes if we are converting auto_increment
196
191
# column to auto_increment column (or not touching it at all, which is more