mirror of
https://github.com/MariaDB/server.git
synced 2025-07-07 06:01:31 +03:00
merging
This commit is contained in:
45
mysql-test/r/row_test.result
Normal file
45
mysql-test/r/row_test.result
Normal file
@ -0,0 +1,45 @@
|
||||
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 (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 4 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;
|
@ -241,10 +241,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
3 SUBSELECT t8 const PRIMARY PRIMARY 35 const 1
|
||||
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo,email FROM
|
||||
t8 WHERE pseudo='joce');
|
||||
Subselect returns more than 1 field
|
||||
Cardinality error (more/less than 1 columns)
|
||||
SELECT pseudo FROM t8 WHERE pseudo=(SELECT * FROM t8 WHERE
|
||||
pseudo='joce');
|
||||
Subselect returns more than 1 field
|
||||
Cardinality error (more/less than 1 columns)
|
||||
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce');
|
||||
pseudo
|
||||
joce
|
||||
|
19
mysql-test/t/row_test.test
Normal file
19
mysql-test/t/row_test.test
Normal file
@ -0,0 +1,19 @@
|
||||
SELECT (1,2,3)=(1,2,3);
|
||||
SELECT (2,2,3)=(1+1,2,3);
|
||||
SELECT (1,2,3)=(1+1,2,3);
|
||||
SELECT (1,2,3)<(1+1,2,3);
|
||||
SELECT (1,2,3)>(1+1,2,3);
|
||||
SELECT (1,2,3)<=(1+1,2,3);
|
||||
SELECT (1,2,3)>=(1+1,2,3);
|
||||
SELECT (1,2,3)<>(1+1,2,3);
|
||||
SELECT (1,2,(3,4,5))=(1,2,(3,4,5));
|
||||
SELECT ('test',2,3.33)=('test',2,3.33);
|
||||
-- error 1239
|
||||
SELECT ('test',2,3.33)=('test',2,3.33,4);
|
||||
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);
|
||||
select * from t1 where (0,2,3)=(a,b,c);
|
||||
select * from t1 where (1,2,3)<(a,b,c);
|
||||
drop table t1;
|
Reference in New Issue
Block a user