~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/row.test

  • Committer: Jay Pipes
  • Date: 2010-03-09 20:02:29 UTC
  • mto: This revision was merged to the branch mainline in revision 1339.
  • Revision ID: jpipes@serialcoder-20100309200229-dfrliy4fads9vyf4
Fixes Bug #535296 by only incrementing ha_commit_count when its a normal transaction commit.

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
-- error 1241
19
19
select row(1,2,row(3,4)) IN (row(3,2,row(3,4)), row(1,2,4));
20
20
select row(1,2,row(3,4)) IN (row(3,2,row(3,4)), row(1,2,row(3,NULL)));
21
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
-- error 1241
41
41
SELECT ROW('test',2,3.33)=ROW('test',2,3.33,4);
42
42
SELECT ROW('test',2,ROW(3,33))=ROW('test',2,ROW(3,33));
43
43
SELECT ROW('test',2,ROW(3,33))=ROW('test',2,ROW(3,3));
44
44
SELECT ROW('test',2,ROW(3,33))=ROW('test',2,ROW(3,NULL));
45
 
--error ER_OPERAND_COLUMNS
 
45
-- error 1241
46
46
SELECT ROW('test',2,ROW(3,33))=ROW('test',2,4);
47
47
 
48
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
-- error 1241
60
60
select ROW(1,1);
61
61
 
62
62
create table t1 (i int);
63
 
--error ER_OPERAND_COLUMNS
 
63
-- error 1241
64
64
select 1 from t1 where ROW(1,1);
65
 
--error ER_OPERAND_COLUMNS
 
65
-- error 1241
66
66
select count(*) from t1 order by ROW(1,1);
67
 
--error ER_OPERAND_COLUMNS
 
67
-- error 1241
68
68
select count(*) from t1 having (1,1) order by i;
69
69
drop table t1;
70
70
 
87
87
# Bug #27484: nested row expressions in IN predicate
88
88
#
89
89
 
90
 
--error ER_OPERAND_COLUMNS
 
90
--error 1241
91
91
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),ROW(1,1));
92
 
--error ER_OPERAND_COLUMNS
 
92
--error 1241
93
93
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),ROW(1,1),ROW(1,ROW(2,3)));
94
 
--error ER_OPERAND_COLUMNS
 
94
--error 1241
95
95
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),ROW(1,ROW(2,2,2)));
96
 
--error ER_OPERAND_COLUMNS
 
96
--error 1241
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 ER_OPERAND_COLUMNS
 
99
--error 1241
100
100
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),(SELECT 1,1));
101
 
--error ER_OPERAND_COLUMNS
 
101
--error 1241
102
102
SELECT ROW(1,ROW(2,3)) IN (ROW(1,ROW(2,3)),(SELECT 1,1),ROW(1,ROW(2,4)));
103
 
--error ER_OPERAND_COLUMNS
 
103
--error 1241
104
104
SELECT ROW(1,ROW(2,3)) IN ((SELECT 1,1),ROW(1,ROW(2,3)));
105
105
 
106
 
--error ER_OPERAND_COLUMNS
 
106
--error 1241
107
107
SELECT ROW(2,1) IN (ROW(21,2),ROW(ROW(1,1,3),0));
108
 
--error ER_OPERAND_COLUMNS
 
108
--error 1241
109
109
SELECT ROW(2,1) IN (ROW(ROW(1,1,3),0),ROW(21,2));
110
110
 
111
111
#