1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

checking columns of top items

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
This commit is contained in:
unknown
2002-11-29 12:30:04 +02:00
parent 5b62dfcdf5
commit 042c34d86d
11 changed files with 47 additions and 16 deletions

View File

@ -35,7 +35,7 @@ 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)
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);
@ -49,3 +49,12 @@ 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;

View File

@ -18,4 +18,19 @@ 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;
drop table t1;
-- error 1239
select (1,1);
drop table if exists t1;
create table t1 (i int);
-- error 1239
select 1 from t1 where (1,1);
-- error 1239
select count(*) from t1 order by (1,1);
#TODO remove comments after parser fixing
#-- error 1239
#select count(*) from t1 order by i having (1,1);
#-- error 1239
#select 1 from t1 limit (1,1), (1,1);
drop table t1;