~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/temp_table.test

  • Committer: Jay Pipes
  • Date: 2009-09-15 21:01:42 UTC
  • mto: (1126.2.5 merge)
  • mto: This revision was merged to the branch mainline in revision 1128.
  • Revision ID: jpipes@serialcoder-20090915210142-x8mwiqn1q0vzjspp
Moves Alter_info out into its own header and source file, cleans up some related include mess in sql_lex.h, and renames Alter_info to AlterInfo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
CREATE TABLE t2 (x int not null, y int not null);
19
19
alter table t2 rename t1;
20
20
select * from t1;
21
 
create TEMPORARY TABLE t2 engine=MEMORY select * from t1;
22
 
create TEMPORARY TABLE IF NOT EXISTS t2 (a int) engine=MEMORY;
 
21
create TEMPORARY TABLE t2 engine=heap select * from t1;
 
22
create TEMPORARY TABLE IF NOT EXISTS t2 (a int) engine=heap;
23
23
 
24
24
# This should give errors
25
 
--error ER_TABLE_EXISTS_ERROR
 
25
--error 1050
26
26
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
27
 
--error ER_TABLE_EXISTS_ERROR
 
27
--error 1050
28
28
ALTER TABLE t1 RENAME t2;
29
29
 
30
30
select * from t2;
88
88
 
89
89
flush status;
90
90
select * from t1 group by d;
91
 
--replace_column 2 #
92
91
show status like "created_tmp%tables";
93
92
drop table t1;
94
93
 
124
123
CREATE TABLE t1 (i INT);
125
124
CREATE TEMPORARY TABLE t2 (i INT);
126
125
 
127
 
--error ER_BAD_TABLE_ERROR
 
126
--error 1051
128
127
DROP TEMPORARY TABLE t2, t1;
129
128
 
130
129
# Table t2 should have been dropped.
131
 
--error ER_TABLE_UNKNOWN
 
130
--error 1146
132
131
SELECT * FROM t2;
133
132
# But table t1 should still be there.
134
133
SELECT * FROM t1;