mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixed error handling bug
fixed naming bug fixed bug of subselect excluding mysql-test/r/subselect.result: test of error handling bug test of naming bug test bug of subselect excluding mysql-test/t/subselect.test: test of error handling bug test of naming bug test bug of subselect excluding sql/item_subselect.cc: fixed naming bug fixed error handling bug sql/sql_lex.cc: fixed subselect excluding bug
This commit is contained in:
@ -35,6 +35,14 @@ Unknown column 'a' in 'field list'
|
||||
SELECT * FROM (SELECT 1 as id) WHERE id IN (SELECT * FROM (SELECT 1 as id) ORDER BY id LIMIT 1);
|
||||
id
|
||||
1
|
||||
SELECT * FROM (SELECT 1) WHERE 1 IN (SELECT 1,1);
|
||||
Cardinality error (more/less than 1 columns)
|
||||
SELECT 1 IN (SELECT 1);
|
||||
1 IN (SELECT 1)
|
||||
1
|
||||
SELECT 1 FROM (SELECT 1 as a) WHERE 1 IN (SELECT (SELECT a));
|
||||
1
|
||||
1
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int, b int);
|
||||
|
@ -16,6 +16,10 @@ SELECT 1 as a FROM (SELECT 1) HAVING (SELECT a)=1;
|
||||
-- error 1054
|
||||
SELECT 1 FROM (SELECT (SELECT a));
|
||||
SELECT * FROM (SELECT 1 as id) WHERE id IN (SELECT * FROM (SELECT 1 as id) ORDER BY id LIMIT 1);
|
||||
-- error 1239
|
||||
SELECT * FROM (SELECT 1) WHERE 1 IN (SELECT 1,1);
|
||||
SELECT 1 IN (SELECT 1);
|
||||
SELECT 1 FROM (SELECT 1 as a) WHERE 1 IN (SELECT (SELECT a));
|
||||
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
|
||||
create table t1 (a int);
|
||||
|
Reference in New Issue
Block a user