~drizzle-trunk/drizzle/development

1063.6.5 by Stewart Smith
reintroduce the ALTER TABLE tests from CSV.test but in a alter_table_basic.test as to be somewhere remotely sane. Also use --sorted_result for unordered queries to ensure result is correct for any engine.
1
create table t1 (v varchar(32) not null);
2
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
3
select * from t1;
4
v
5
3r4f
6
abc
7
def
8
hij
9
alter table t1 change v v2 varchar(32);
10
select * from t1;
11
v2
12
3r4f
13
abc
14
def
15
hij
16
alter table t1 change v2 v varchar(64);
17
select * from t1;
18
v
19
3r4f
20
abc
21
def
22
hij
23
update t1 set v = 'lmn' where v = 'hij';
24
select * from t1;
25
v
26
3r4f
27
abc
28
def
29
lmn
30
alter table t1 add i int auto_increment not null primary key first;
31
select * from t1;
32
i	v
33
1	def
34
2	abc
35
3	lmn
36
4	3r4f
37
update t1 set i=5 where i=3;
38
select * from t1;
39
i	v
40
1	def
41
2	abc
42
4	3r4f
43
5	lmn
44
alter table t1 change i i bigint;
45
select * from t1;
46
i	v
47
1	def
48
2	abc
49
4	3r4f
50
5	lmn
51
alter table t1 add unique key (i, v);
52
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
53
i	v
54
4	3r4f
55
drop table t1;