~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/temp_table.test

  • Committer: Monty Taylor
  • Date: 2009-09-30 07:01:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1184.
  • Revision ID: mordred@inaugust.com-20090930070132-b1ol1xu1rpajdddy
Small namespace cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
--disable_warnings
6
6
drop table if exists t1,t2;
7
 
drop view if exists v1;
 
7
# we don't support views
 
8
#drop view if exists v1;
8
9
--enable_warnings
9
10
 
10
11
CREATE TABLE t1 (c int not null, d char (10) not null);
54
55
#
55
56
# Problem with ELT
56
57
#
57
 
create temporary table t1 (id int(10) not null unique);
58
 
create temporary table t2 (id int(10) not null primary key, 
59
 
val int(10) not null);
 
58
create temporary table t1 (id int not null unique);
 
59
create temporary table t2 (id int not null primary key, val int not null);
60
60
 
61
61
# put in some initial values
62
62
insert into t1 values (1),(2),(4);
79
79
# In MySQL 4.0.4 doing a GROUP BY on a NULL column created a disk based
80
80
# temporary table when a memory based one would be good enough.
81
81
 
82
 
CREATE TABLE t1 (
 
82
CREATE TEMPORARY TABLE t1 (
83
83
  d datetime default NULL
84
84
) ENGINE=MyISAM;
85
85
 
92
92
drop table t1;
93
93
 
94
94
# Fix for BUG#8921: Check that temporary table is ingored by view commands.
95
 
create temporary table v1 as select 'This is temp. table' A;
96
 
create view v1 as select 'This is view' A;
97
 
select * from v1;
98
 
show create table v1;
99
 
show create view v1;
100
 
drop view v1;
101
 
select * from v1;
102
 
create view v1 as select 'This is view again' A;
103
 
select * from v1;
104
 
drop table v1;
105
 
select * from v1;
106
 
drop view v1;
 
95
# Commenting this out since we don't support views
 
96
#create temporary table v1 as select 'This is temp. table' A;
 
97
#create view v1 as select 'This is view' A;
 
98
#select * from v1;
 
99
#show create table v1;
 
100
#show create view v1;
 
101
#drop view v1;
 
102
#select * from v1;
 
103
#create view v1 as select 'This is view again' A;
 
104
#select * from v1;
 
105
#drop table v1;
 
106
#select * from v1;
 
107
#drop view v1;
107
108
 
108
109
# Bug #8497: tmpdir with extra slashes would cause failures
109
110
#
116
117
 
117
118
 
118
119
#
119
 
# BUG#21096: locking issue ; temporary table conflicts.
120
 
#
121
 
# The problem was that on DROP TEMPORARY table name lock was acquired,
122
 
# which should not be done.
123
 
#
124
 
--disable_warnings
125
 
DROP TABLE IF EXISTS t1;
126
 
--enable_warnings
127
 
 
128
 
CREATE TABLE t1 (i INT);
129
 
 
130
 
LOCK TABLE t1 WRITE;
131
 
 
132
 
connect (conn1, localhost, root,,);
133
 
 
134
 
CREATE TEMPORARY TABLE t1 (i INT);
135
 
 
136
 
--echo The following command should not block
137
 
DROP TEMPORARY TABLE t1;
138
 
 
139
 
disconnect conn1;
140
 
connection default;
141
 
 
142
 
DROP TABLE t1;
143
 
 
144
 
#
145
120
# Check that it's not possible to drop a base table with
146
121
# DROP TEMPORARY statement.
147
122
#