mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
mysql-test/r/row_test.result: changed error message (report requestet columns number) new tests mysql-test/t/row_test.test: new tests sql/item.h: checking columns of wrapper items
61 lines
1.3 KiB
Plaintext
61 lines
1.3 KiB
Plaintext
SELECT (1,2,3)=(1,2,3);
|
|
(1,2,3)=(1,2,3)
|
|
1
|
|
SELECT (2,2,3)=(1+1,2,3);
|
|
(2,2,3)=(1+1,2,3)
|
|
1
|
|
SELECT (1,2,3)=(1+1,2,3);
|
|
(1,2,3)=(1+1,2,3)
|
|
0
|
|
SELECT (1,2,3)<(1+1,2,3);
|
|
(1,2,3)<(1+1,2,3)
|
|
1
|
|
SELECT (1,2,3)>(1+1,2,3);
|
|
(1,2,3)>(1+1,2,3)
|
|
0
|
|
SELECT (1,2,3)<=(1+1,2,3);
|
|
(1,2,3)<=(1+1,2,3)
|
|
1
|
|
SELECT (1,2,3)>=(1+1,2,3);
|
|
(1,2,3)>=(1+1,2,3)
|
|
0
|
|
SELECT (1,2,3)<>(1+1,2,3);
|
|
(1,2,3)<>(1+1,2,3)
|
|
1
|
|
SELECT (NULL,2,3)=(NULL,2,3);
|
|
(NULL,2,3)=(NULL,2,3)
|
|
NULL
|
|
SELECT (NULL,2,3)<=>(NULL,2,3);
|
|
(NULL,2,3)<=>(NULL,2,3)
|
|
1
|
|
SELECT (1,2,(3,4,5))=(1,2,(3,4,5));
|
|
(1,2,(3,4,5))=(1,2,(3,4,5))
|
|
1
|
|
SELECT ('test',2,3.33)=('test',2,3.33);
|
|
('test',2,3.33)=('test',2,3.33)
|
|
1
|
|
SELECT ('test',2,3.33)=('test',2,3.33,4);
|
|
Cardinality error (more/less than 3 columns)
|
|
drop table if exists t1;
|
|
create table t1 ( a int, b int, c int);
|
|
insert into t1 values (1,2,3), (2,3,1), (3,2,1);
|
|
select * from t1 where (1,2,3)=(a,b,c);
|
|
a b c
|
|
1 2 3
|
|
select * from t1 where (0,2,3)=(a,b,c);
|
|
a b c
|
|
select * from t1 where (1,2,3)<(a,b,c);
|
|
a b c
|
|
2 3 1
|
|
3 2 1
|
|
drop table t1;
|
|
select (1,1);
|
|
Cardinality error (more/less than 1 columns)
|
|
drop table if exists t1;
|
|
create table t1 (i int);
|
|
select 1 from t1 where (1,1);
|
|
Cardinality error (more/less than 1 columns)
|
|
select count(*) from t1 order by (1,1);
|
|
Cardinality error (more/less than 1 columns)
|
|
drop table t1;
|