--
-- ### Table structure change checks
--
create table t1 (  primary a int not null, b string(5) );
alter table t1 add column c tinyint;
desc table t1;

create index i1 on t1 ( b );
alter table t1 modify column b string(10);
alter table t1 add column d string(10);
alter table t1 add column e string(10);
alter table t1 drop column d;
alter table t1 add column f string(10), add column g int;
alter table t1 drop column f, drop column g, drop column e;
alter table t1 add column d string(5);

desc table t1;
desc index i1;

insert into t1 values ( 0, 'xxx', (tinyint)1, 'XXX');
insert into t1 values ( 1, 'yyy', (tinyint)2, 'XXX');
insert into t1 values ( 2, 'zzz', (tinyint)3, 'XXX');

select * from t1;

alter table t1 drop column b;
desc table t1;


create table t2 ( primary a int not null, b int );

list table;
rename table t2 to t3;
rename index t2_pidx to t3_pidx;

insert into t3 values ( 0, 1);
insert into t3 values ( 1, 2);
insert into t3 values ( 2, 3);
insert into t3 values ( 3, 4);


list table;


drop table t1;
drop table t3;


