~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/derived.test

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
--enable_warnings
5
5
 
6
6
select * from (select 2) b;
 
7
--error ER_BAD_FIELD_ERROR
7
8
SELECT 1 as a FROM (SELECT 1 UNION SELECT a) b;
 
9
--error ER_BAD_FIELD_ERROR
8
10
SELECT 1 as a FROM (SELECT a UNION SELECT 1) b;
9
11
CREATE TABLE t1 (a int not null, b char (10) not null);
10
12
insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
28
28
--error ER_BAD_FIELD_ERROR
29
29
SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1  HAVING a=1) as a;
30
30
--sort_result
31
 
select * from t1 as x1, (select * from t1) as x2;
32
 
explain select * from t1 as x1, (select * from t1) as x2;
 
31
select * from t1 as x1, (select * from t1) as x2 where x1.a != 0;
 
32
explain select * from t1 as x1, (select * from t1) as x2 where x1.a != 0;
33
33
drop table if exists  t2,t3;
34
34
select * from (select 1) as a;
35
35
select a from (select 1 as a) as b;
58
58
enable_query_log;
59
59
SELECT * FROM (SELECT * FROM t1) as b ORDER BY a  ASC LIMIT 0,20;
60
60
--replace_column 9 X
61
 
explain select count(*) from t1 as tt1, (select * from t1) as tt2;
 
61
explain select count(*) from t1 as tt1, (select * from t1) as tt2 where tt1.a != 0;
62
62
drop table t1;
63
63
SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a) as a )) as b;
64
64
select * from (select 1 as a) b  left join (select 2 as a) c using(a);
105
105
#
106
106
create table t1 (a int);
107
107
insert into t1 values (1),(2),(3);
 
108
--error ER_PARSE_ERROR
108
109
delete from (select * from t1);
 
110
--error ER_PARSE_ERROR
109
111
insert into  (select * from t1) values (5);
110
112
drop table t1;
111
113
 
125
125
create table t1 (a int);
126
126
insert into t1 values (1),(2);
127
127
--sort_result
128
 
select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
129
 
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
 
128
select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b where a.a != 0;
 
129
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b where a.a != 0;
130
130
drop table t1;
131
131
 
132
132
#
221
221
#
222
222
create table t1 (a int);
223
223
create table t2 (a int);
224
 
select * from (select * from t1,t2) foo;
 
224
select * from (select * from t1,t2 where t1.a != 0) foo;
225
225
drop table t1,t2;
226
226
 
227
227
#