~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/alter_table.result

  • Committer: lbieber
  • Date: 2010-09-11 16:33:45 UTC
  • mfrom: (1757.1.2 build)
  • Revision ID: lbieber@orisndriz03-20100911163345-na1t8m18at9thsjl
Merge Vijay - added utf 8 tamil test case suite and test case for creating a database in tamil
Merge Brian - Small set of refactoring (includes one case of memset on a table object).

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
9
9
col6 int not null, to_be_deleted int);
10
10
insert into t1 values (2,4,3,5,"PENDING",1,7);
11
 
SELECT * FROM t1;
12
 
col1    col2    col3    col4    col5    col6    to_be_deleted
13
 
2       4       3       5       PENDING 1       7
14
11
alter table t1
15
12
add column col4_5 varchar(20) not null after col4,
16
13
add column col7 varchar(30) not null after col5,
17
14
add column col8 datetime not null default '1000-01-01 00:00:00', drop column to_be_deleted,
18
15
change column col2 fourth varchar(30) not null after col3,
19
16
modify column col6 int not null first;
20
 
ERROR HY000: Either a DEFAULt value or NULL NULL description is required for a new column if table is not empty
21
 
alter table t1
22
 
add column col4_5 varchar(20) DEFAULT "added" not null after col4,
23
 
add column col7 varchar(30) DEFAULT "added" not null after col5,
24
 
add column col8 datetime not null default '1000-01-01 00:00:00',
25
 
drop column to_be_deleted,
26
 
change column col2 fourth varchar(30) not null after col3,
27
 
modify column col6 int not null first;
28
17
select * from t1;
29
18
col6    col1    col3    fourth  col4    col4_5  col5    col7    col8
30
 
1       2       3       4       5       added   PENDING added   1000-01-01 00:00:00
 
19
1       2       3       4       5               PENDING         1000-01-01 00:00:00
31
20
drop table t1;
32
21
create table t1 (bandID INT NOT NULL PRIMARY KEY, payoutID int NOT NULL);
33
22
insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,12),(8,12);
527
516
use mysqltest;
528
517
drop database mysqltest;
529
518
alter table test.t1 rename t1;
530
 
ERROR 3D000: No schema selected
 
519
ERROR 3D000: No database selected
531
520
alter table test.t1 rename test.t1;
532
521
use test;
533
522
drop table t1;
861
850
"Non-copy data change - new frm, but old data and index files"
862
851
ALTER TABLE t1 CHANGE int_field unsigned_int_field INTEGER NOT NULL, RENAME t2;
863
852
SELECT * FROM t1 ORDER BY int_field;
864
 
ERROR 42S02: Unknown table 'test.t1'
 
853
ERROR 42S02: Table 'test.t1' doesn't exist
865
854
SELECT * FROM t2 ORDER BY unsigned_int_field;
866
855
unsigned_int_field      char_field
867
856
1       edno