~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/create.test

  • Committer: Brian Aker
  • Date: 2009-07-31 23:20:14 UTC
  • mto: This revision was merged to the branch mainline in revision 1108.
  • Revision ID: brian@gaz-20090731232014-amd6192q1n8wade0
Heap is now tmp only table

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
select * from t1;
20
20
drop table t1;
21
21
 
22
 
create table t1 (a int not null auto_increment,primary key (a)) engine=heap;
 
22
create temporary table t1 (a int not null auto_increment,primary key (a)) engine=heap;
23
23
drop table t1;
24
24
 
25
25
#
27
27
#
28
28
 
29
29
--error 1146
30
 
create table t2 engine=heap select * from t1;
 
30
create temporary table t2 engine=heap select * from t1;
31
31
--error 1146
32
32
create table t2 select auto+1 from t1;
33
33
drop table if exists t1,t2;
34
34
--error 1167
35
35
create table t1 (b char(0) not null, index(b));
36
36
--error 1163
37
 
create table t1 (a int not null,b text) engine=heap;
 
37
create temporary table t1 (a int not null,b text) engine=heap;
38
38
drop table if exists t1;
39
39
 
40
40
--error 1075
41
 
create table t1 (ordid int not null auto_increment, ord  varchar(50) not null, primary key (ord,ordid)) engine=heap;
 
41
create temporary table t1 (ordid int not null auto_increment, ord  varchar(50) not null, primary key (ord,ordid)) engine=heap;
42
42
 
43
43
-- error 1049
44
44
create table not_existing_database.test (a int);
182
182
#
183
183
SET SESSION storage_engine="heap";
184
184
SELECT @@storage_engine;
185
 
CREATE TABLE t1 (a int not null);
 
185
CREATE TEMPORARY TABLE t1 (a int not null);
186
186
show create table t1;
187
187
drop table t1;
188
188
--error 1286
189
189
SET SESSION storage_engine="gemini";
190
190
SELECT @@storage_engine;
191
 
CREATE TABLE t1 (a int not null);
 
191
CREATE TEMPORARY TABLE t1 (a int not null);
192
192
show create table t1;
193
193
SET SESSION storage_engine=default;
194
194
drop table t1;
333
333
#
334
334
SET SESSION storage_engine="heap";
335
335
SELECT @@storage_engine;
336
 
CREATE TABLE t1 (a int not null);
 
336
CREATE TEMPORARY TABLE t1 (a int not null);
337
337
show create table t1;
338
338
drop table t1;
339
339
--error 1286
340
340
SET SESSION storage_engine="gemini";
341
341
SELECT @@storage_engine;
342
 
CREATE TABLE t1 (a int not null);
 
342
CREATE TEMPORARY TABLE t1 (a int not null);
343
343
show create table t1;
344
344
SET SESSION storage_engine=default;
345
345
drop table t1;
1108
1108
# Show that in case of multiple index type definitions, the last one takes 
1109
1109
# precedence
1110
1110
 
1111
 
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
 
1111
CREATE TEMPORARY TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
1112
1112
SHOW INDEX FROM t1;
1113
1113
DROP TABLE t1;
1114
1114
 
1115
 
CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
 
1115
CREATE TEMPORARY TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
1116
1116
SHOW INDEX FROM t1;
1117
1117
DROP TABLE t1;
1118
1118