diff options
author | sergefp@mysql.com <> | 2006-07-21 03:04:04 +0400 |
---|---|---|
committer | sergefp@mysql.com <> | 2006-07-21 03:04:04 +0400 |
commit | bffd438de3a09f7001107648d09c398275cfa136 (patch) | |
tree | 870ce9c07717c98bedb9710afb3c7278c02b623f /mysql-test/t/subselect.test | |
parent | f201828dd81019a45a3908761454d13b8b8d94d5 (diff) | |
download | mariadb-git-bffd438de3a09f7001107648d09c398275cfa136.tar.gz |
BUG#20975: Incorrect query result for NOT (subquery):
Add implementations of Item_func_{nop,not}_all::neg_transformer
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r-- | mysql-test/t/subselect.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index e01310bba45..1bcd37dd7d7 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -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 |