~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/alter_table.test

  • Committer: Brian Aker
  • Date: 2009-06-16 00:53:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1094.
  • Revision ID: brian@gaz-20090616005322-w0ode4jul9z8s2y9
Partial fix for tests for tmp

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
select * from t1;
56
56
drop table t1;
57
57
 
58
 
CREATE TABLE t1 (
 
58
CREATE TEMPORARY TABLE t1 (
59
59
  id int NOT NULL default '0',
60
60
  category_id int NOT NULL default '0',
61
61
  type_id int NOT NULL default '0',
155
155
# Test with two keys
156
156
#
157
157
 
158
 
CREATE TABLE t1 (
 
158
CREATE TEMPORARY TABLE t1 (
159
159
  Host varchar(16) binary NOT NULL default '',
160
160
  User varchar(16) binary NOT NULL default '',
161
161
  PRIMARY KEY  (Host,User),
189
189
# BUG#6236 - ALTER TABLE MODIFY should set implicit NOT NULL on PK columns
190
190
#
191
191
drop table if exists t1;
192
 
create table t1 ( a varchar(10) not null primary key ) engine=myisam;
 
192
create TEMPORARY table t1 ( a varchar(10) not null primary key ) engine=myisam;
193
193
flush tables;
194
194
alter table t1 modify a varchar(10);
195
195
flush tables;
199
199
# The following is also part of bug #6236 (CREATE TABLE didn't properly count
200
200
# not null columns for primary keys)
201
201
 
202
 
create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
 
202
create TEMPORARY table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
203
203
insert into t1 (a,b,c,d,e,f,g,h,i) values(1,1,1,1,1,1,1,1,1);
204
204
--replace_column 3 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
205
205
show table status like 't1';
207
207
--replace_column 3 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
208
208
show table status like 't1';
209
209
drop table t1;
210
 
create table t1 (a int not null default 0, b int not null default 0, c int not null default 0, d int not null default 0, e int not null default 0, f int not null default 0, g int not null default 0, h int not null default 0,i int not null default 0, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
 
210
create TEMPORARY table t1 (a int not null default 0, b int not null default 0, c int not null default 0, d int not null default 0, e int not null default 0, f int not null default 0, g int not null default 0, h int not null default 0,i int not null default 0, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
211
211
insert into t1 (a) values(1);
212
212
--replace_column 3 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
213
213
show table status like 't1';
237
237
# BUG 12207 alter table ... discard table space on MyISAM table causes ERROR 2013 (HY000)
238
238
#
239
239
# Some platforms (Mac OS X, Windows) will send the error message using small letters.
240
 
CREATE TABLE T12207(a int) ENGINE=MYISAM;
 
240
CREATE TEMPORARY TABLE T12207(a int) ENGINE=MYISAM;
241
241
--replace_result t12207 T12207
242
242
--error ER_ILLEGAL_HA
243
243
ALTER TABLE T12207 DISCARD TABLESPACE;
491
491
# Bug#25262 Auto Increment lost when changing Engine type
492
492
#
493
493
 
494
 
create table t1(id int primary key auto_increment) engine=heap;
 
494
create TEMPORARY table t1(id int primary key auto_increment) engine=heap;
495
495
 
496
496
insert into t1 values (null);
497
497
insert into t1 values (null);
566
566
# without # prefix is not allowed for TEXT columns, while index
567
567
# is defined with prefix.
568
568
569
 
create table t1 (t varchar(255) default null, key t (t(80))) engine=myisam;
 
569
create TEMPORARY table t1 (t varchar(255) default null, key t (t(80))) engine=myisam;
570
570
alter table t1 change t t text;
571
571
drop table t1;
572
572