1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug#25262 Auto Increment lost when changing Engine type

- Try to copy the autoincrement value when altering the table
This commit is contained in:
msvensson@pilot.blaudden
2007-03-01 13:43:04 +01:00
parent 0ee93fdb02
commit 61140f0446
5 changed files with 131 additions and 0 deletions

View File

@@ -613,3 +613,31 @@ create table t1 (t varchar(255) default null, key t (t(80)))
engine=myisam default charset=latin1;
alter table t1 change t t text;
drop table t1;
#
# Bug#25262 Auto Increment lost when changing Engine type
#
create table t1(id int(8) primary key auto_increment) engine=heap;
insert into t1 values (null);
insert into t1 values (null);
select * from t1;
# Set auto increment to 50
alter table t1 auto_increment = 50;
# Alter to myisam
alter table t1 engine = myisam;
# This insert should get id 50
insert into t1 values (null);
select * from t1;
# Alter to heap again
alter table t1 engine = heap;
insert into t1 values (null);
select * from t1;
drop table t1;