1
# originally from csv.test (and who knows what it was doing there)
3
# tests different types of alter table that some should be fast, others
5
# rather useless without EXPLAIN ALTER TABLE though
7
create table t1 (v varchar(32) not null);
8
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
11
# Fast alter, no copy performed
12
alter table t1 change v v2 varchar(32);
15
# Fast alter, no copy performed
16
alter table t1 change v2 v varchar(64);
19
update t1 set v = 'lmn' where v = 'hij';
23
alter table t1 add i int auto_increment not null primary key first;
26
update t1 set i=5 where i=3;
29
alter table t1 change i i bigint;
32
alter table t1 add unique key (i, v);
34
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');