mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#20975: Incorrect query result for NOT (subquery):
Add implementations of Item_func_{nop,not}_all::neg_transformer mysql-test/r/subselect.result: BUG#20975: testcase mysql-test/t/subselect.test: BUG#20975: testcase sql/mysql_priv.h: Make chooser_compare_func_creator visible in item.h
This commit is contained in:
@ -2868,3 +2868,29 @@ select 1 from dual where 1 < any (select 2 from dual);
|
||||
select 1 from dual where 1 < all (select 2 from dual where 1!=1);
|
||||
1
|
||||
1
|
||||
create table t1 (s1 char);
|
||||
insert into t1 values (1),(2);
|
||||
select * from t1 where (s1 < any (select s1 from t1));
|
||||
s1
|
||||
1
|
||||
select * from t1 where not (s1 < any (select s1 from t1));
|
||||
s1
|
||||
2
|
||||
select * from t1 where (s1 < ALL (select s1+1 from t1));
|
||||
s1
|
||||
1
|
||||
select * from t1 where not(s1 < ALL (select s1+1 from t1));
|
||||
s1
|
||||
2
|
||||
select * from t1 where (s1+1 = ANY (select s1 from t1));
|
||||
s1
|
||||
1
|
||||
select * from t1 where NOT(s1+1 = ANY (select s1 from t1));
|
||||
s1
|
||||
2
|
||||
select * from t1 where (s1 = ALL (select s1/s1 from t1));
|
||||
s1
|
||||
1
|
||||
select * from t1 where NOT(s1 = ALL (select s1/s1 from t1));
|
||||
s1
|
||||
2
|
||||
|
@ -1844,4 +1844,20 @@ select 1 from dual where 2 > any (select 1);
|
||||
select 1 from dual where 2 > all (select 1);
|
||||
select 1 from dual where 1 < any (select 2 from dual);
|
||||
select 1 from dual where 1 < all (select 2 from dual where 1!=1);
|
||||
|
||||
# BUG#20975 Wrong query results for subqueries within NOT
|
||||
create table t1 (s1 char);
|
||||
insert into t1 values (1),(2);
|
||||
|
||||
select * from t1 where (s1 < any (select s1 from t1));
|
||||
select * from t1 where not (s1 < any (select s1 from t1));
|
||||
|
||||
select * from t1 where (s1 < ALL (select s1+1 from t1));
|
||||
select * from t1 where not(s1 < ALL (select s1+1 from t1));
|
||||
|
||||
select * from t1 where (s1+1 = ANY (select s1 from t1));
|
||||
select * from t1 where NOT(s1+1 = ANY (select s1 from t1));
|
||||
|
||||
select * from t1 where (s1 = ALL (select s1/s1 from t1));
|
||||
select * from t1 where NOT(s1 = ALL (select s1/s1 from t1));
|
||||
# End of 4.1 tests
|
||||
|
Reference in New Issue
Block a user