mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge moonbone.local:/work/16302-bug-4.1-opt-mysql
into moonbone.local:/work/tmp_merge-5.0-opt-mysql sql/item_subselect.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/subselect.result: Manual merge mysql-test/t/subselect.test: Manual merge
This commit is contained in:
@ -2854,6 +2854,40 @@ a
|
||||
3
|
||||
4
|
||||
DROP TABLE t1,t2,t3;
|
||||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||
CREATE TABLE t1 (f1 INT);
|
||||
CREATE TABLE t2 (f2 INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2);
|
||||
f1
|
||||
1
|
||||
SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2 WHERE 1=0);
|
||||
f1
|
||||
1
|
||||
INSERT INTO t2 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2);
|
||||
SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2 WHERE f2=0);
|
||||
f1
|
||||
1
|
||||
DROP TABLE t1, t2;
|
||||
select 1 from dual where 1 < any (select 2);
|
||||
1
|
||||
1
|
||||
select 1 from dual where 1 < all (select 2);
|
||||
1
|
||||
1
|
||||
select 1 from dual where 2 > any (select 1);
|
||||
1
|
||||
1
|
||||
select 1 from dual where 2 > all (select 1);
|
||||
1
|
||||
1
|
||||
select 1 from dual where 1 < any (select 2 from dual);
|
||||
1
|
||||
1
|
||||
select 1 from dual where 1 < all (select 2 from dual where 1!=1);
|
||||
1
|
||||
1
|
||||
create table t1 (df decimal(5,1));
|
||||
insert into t1 values(1.1);
|
||||
insert into t1 values(2.2);
|
||||
|
@ -1821,6 +1821,36 @@ SELECT * FROM t1
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
#
|
||||
# BUG #10308: purge log with subselect
|
||||
#
|
||||
|
||||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||
|
||||
|
||||
#
|
||||
# Bug#18503: Queries with a quantified subquery returning empty set may
|
||||
# return a wrong result.
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT);
|
||||
CREATE TABLE t2 (f2 INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2);
|
||||
SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2 WHERE 1=0);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2);
|
||||
SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2 WHERE f2=0);
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# Bug#16302: Quantified subquery without any tables gives wrong results
|
||||
#
|
||||
select 1 from dual where 1 < any (select 2);
|
||||
select 1 from dual where 1 < all (select 2);
|
||||
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);
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user