~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/row.test

  • Committer: Olaf van der Spek
  • Date: 2011-02-12 18:24:24 UTC
  • mto: (2167.1.2 build) (2172.1.4 build)
  • mto: This revision was merged to the branch mainline in revision 2168.
  • Revision ID: olafvdspek@gmail.com-20110212182424-kgnm9osi7qo97at2
casts

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
select row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3));
16
16
select row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3));
17
17
select (1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4)));
 
18
--error ER_OPERAND_COLUMNS
18
19
select row(1,2,row(3,4)) IN (row(3,2,row(3,4)), row(1,2,4));
19
20
select row(1,2,row(3,4)) IN (row(3,2,row(3,4)), row(1,2,row(3,NULL)));
20
21
explain extended select row(1,2,row(3,4)) IN (row(3,2,row(3,4)), row(1,2,row(3,NULL)));
37
37
SELECT ROW(NULL,2,3)<=>ROW(NULL,2,3);
38
38
SELECT ROW(1,2,ROW(3,4,5))=ROW(1,2,ROW(3,4,5));
39
39
SELECT ROW('test',2,3.33)=ROW('test',2,3.33);
 
40
--error ER_OPERAND_COLUMNS
40
41
SELECT ROW('test',2,3.33)=ROW('test',2,3.33,4);
41
42
SELECT ROW('test',2,ROW(3,33))=ROW('test',2,ROW(3,33));
42
43
SELECT ROW('test',2,ROW(3,33))=ROW('test',2,ROW(3,3));
43
44
SELECT ROW('test',2,ROW(3,33))=ROW('test',2,ROW(3,NULL));
 
45
--error ER_OPERAND_COLUMNS
44
46
SELECT ROW('test',2,ROW(3,33))=ROW('test',2,4);
45
47
 
46
48
create table t1 ( a int, b int, c int);
56
56
select ROW(1,2,3) IN(row(a,b,c), row(1,2,3)) from t1;
57
57
drop table t1;
58
58
 
 
59
--error ER_OPERAND_COLUMNS
59
60
select ROW(1,1);
60
61
 
61
62
create table t1 (i int);
 
63
--error ER_OPERAND_COLUMNS
62
64
select 1 from t1 where ROW(1,1);
 
65
--error ER_OPERAND_COLUMNS
63
66
select count(*) from t1 order by ROW(1,1);
 
67
--error ER_OPERAND_COLUMNS
64
68
select count(*) from t1 having (1,1) order by i;
65
69
drop table t1;
66
70
 
87
87
# Bug #27484: nested row expressions in IN predicate
88
88
#
89
89
 
90
 
--error 1241
 
90
--error ER_OPERAND_COLUMNS
91
91
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),ROW(1,1));
92
 
--error 1241
 
92
--error ER_OPERAND_COLUMNS
93
93
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),ROW(1,1),ROW(1,ROW(2,3)));
94
 
--error 1241
 
94
--error ER_OPERAND_COLUMNS
95
95
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),ROW(1,ROW(2,2,2)));
96
 
--error 1241
 
96
--error ER_OPERAND_COLUMNS
97
97
SELECT ROW(1,ROW(2,3,4)) IN (ROW(1,ROW(2,3,4)),ROW(1,ROW(2,2)));
98
98
 
99
 
--error 1241
 
99
--error ER_OPERAND_COLUMNS
100
100
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),(SELECT 1,1));
101
 
--error 1241
 
101
--error ER_OPERAND_COLUMNS
102
102
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),(SELECT 1,1),ROW(1,ROW(2,4)));
103
 
--error 1241
 
103
--error ER_OPERAND_COLUMNS
104
104
SELECT ROW(1,ROW(2,3)) IN ((SELECT 1,1),ROW(1,ROW(2,3)));
105
105
 
106
 
--error 1241
 
106
--error ER_OPERAND_COLUMNS
107
107
SELECT ROW(2,1) IN (ROW(21,2),ROW(ROW(1,1,3),0));
108
 
--error 1241
 
108
--error ER_OPERAND_COLUMNS
109
109
SELECT ROW(2,1) IN (ROW(ROW(1,1,3),0),ROW(21,2));
110
110
 
111
111
#