~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/temp_table.result

  • Committer: Brian Aker
  • Date: 2010-02-11 22:43:58 UTC
  • Revision ID: brian@gaz-20100211224358-y0gdvnat2ahg4c1e
Disabling support for memcached plugins until we can test for version of
memcached.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1,t2;
2
 
drop view if exists v1;
3
2
CREATE TABLE t1 (c int not null, d char (10) not null);
4
3
insert into t1 values(1,""),(2,"a"),(3,"b");
5
4
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
22
21
4       e
23
22
5       f
24
23
6       g
25
 
create TEMPORARY TABLE t2 engine=heap select * from t1;
26
 
create TEMPORARY TABLE IF NOT EXISTS t2 (a int) engine=heap;
 
24
create TEMPORARY TABLE t2 engine=MEMORY select * from t1;
 
25
create TEMPORARY TABLE IF NOT EXISTS t2 (a int) engine=MEMORY;
27
26
Warnings:
28
27
Note    1050    Table 't2' already exists
29
28
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
63
62
INSERT INTO t1 VALUES (1), (2), (3);
64
63
CREATE TEMPORARY TABLE tmp SELECT *, NULL FROM t1;
65
64
drop table t1;
66
 
create temporary table t1 (id int(10) not null unique);
67
 
create temporary table t2 (id int(10) not null primary key, 
68
 
val int(10) not null);
 
65
create temporary table t1 (id int not null unique);
 
66
create temporary table t2 (id int not null primary key, val int not null);
69
67
insert into t1 values (1),(2),(4);
70
68
insert into t2 values (1,1),(2,1),(3,1),(4,2);
71
69
select one.id, two.val, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id;
79
77
alter table t1 add primary key (a);
80
78
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
81
79
drop table t1;
82
 
CREATE TABLE t1 (
 
80
CREATE TEMPORARY TABLE t1 (
83
81
d datetime default NULL
84
82
) ENGINE=MyISAM;
85
83
INSERT INTO t1 VALUES ('2002-10-24 14:50:32'),('2002-10-24 14:50:33'),('2002-10-24 14:50:34'),('2002-10-24 14:50:34'),('2002-10-24 14:50:34'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:38'),('2002-10-24 14:50:38'),('2002-10-24 14:50:38'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:40'),('2002-10-24 14:50:40'),('2002-10-24 14:50:40');
100
98
Created_tmp_disk_tables 0
101
99
Created_tmp_tables      1
102
100
drop table t1;
103
 
create temporary table v1 as select 'This is temp. table' A;
104
 
create view v1 as select 'This is view' A;
105
 
select * from v1;
106
 
A
107
 
This is temp. table
108
 
show create table v1;
109
 
Table   Create Table
110
 
v1      CREATE TEMPORARY TABLE `v1` (
111
 
  `A` varchar(19) NOT NULL DEFAULT ''
112
 
) ENGINE=MyISAM DEFAULT CHARSET=latin1
113
 
show create view v1;
114
 
View    Create View     character_set_client    collation_connection
115
 
v1      CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 'This is view' AS `A`    latin1  latin1_swedish_ci
116
 
drop view v1;
117
 
select * from v1;
118
 
A
119
 
This is temp. table
120
 
create view v1 as select 'This is view again' A;
121
 
select * from v1;
122
 
A
123
 
This is temp. table
124
 
drop table v1;
125
 
select * from v1;
126
 
A
127
 
This is view again
128
 
drop view v1;
129
101
create table t1 (a int, b int, index(a), index(b));
130
102
create table t2 (c int auto_increment, d varchar(255), primary key (c));
131
103
insert into t1 values (3,1),(3,2);
135
107
bar     2
136
108
foo     1
137
109
drop table t1, t2;
138
 
DROP TABLE IF EXISTS t1;
139
 
CREATE TABLE t1 (i INT);
140
 
LOCK TABLE t1 WRITE;
141
 
CREATE TEMPORARY TABLE t1 (i INT);
142
 
The following command should not block
143
 
DROP TEMPORARY TABLE t1;
144
 
DROP TABLE t1;
145
110
CREATE TABLE t1 (i INT);
146
111
CREATE TEMPORARY TABLE t2 (i INT);
147
112
DROP TEMPORARY TABLE t2, t1;