~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/alter_table_basic.test

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# originally from csv.test (and who knows what it was doing there)
2
 
#
3
 
# tests different types of alter table that some should be fast, others
4
 
# copying.
5
 
# rather useless without EXPLAIN ALTER TABLE though
6
 
 
7
 
create table t1 (v varchar(32) not null);
8
 
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
9
 
--sorted_result
10
 
select * from t1;
11
 
# Fast alter, no copy performed
12
 
alter table t1 change v v2 varchar(32);
13
 
--sorted_result
14
 
select * from t1;
15
 
# Fast alter, no copy performed
16
 
alter table t1 change v2 v varchar(64);
17
 
--sorted_result
18
 
select * from t1;
19
 
update t1 set v = 'lmn' where v = 'hij';
20
 
--sorted_result
21
 
select * from t1;
22
 
# Regular alter table
23
 
alter table t1 add i int auto_increment not null primary key first;
24
 
--sorted_result
25
 
select * from t1;
26
 
update t1 set i=5 where i=3;
27
 
--sorted_result
28
 
select * from t1;
29
 
alter table t1 change i i bigint;
30
 
--sorted_result
31
 
select * from t1;
32
 
alter table t1 add unique key (i, v);
33
 
--sorted_result
34
 
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
35
 
drop table t1;