From 1495924319c1b6fab0261a7206e872f43f0c4857 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Jan 2007 17:10:45 -0800 Subject: Fixed bug #24420. Objects of the classes Item_func_is_not_null_test and Item_func_trig_cond must be transparent for the method Item::split_sum_func2 as these classes are pure helpers. It means that the method Item::split_sum_func2 should look at those objects as at pure wrappers. mysql-test/r/subselect3.result: Added a test case for bug #24420. mysql-test/t/subselect3.test: Added a test case for bug #24420. --- mysql-test/t/subselect3.test | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mysql-test/t/subselect3.test') diff --git a/mysql-test/t/subselect3.test b/mysql-test/t/subselect3.test index 23d78721dbe..ed8480ba464 100644 --- a/mysql-test/t/subselect3.test +++ b/mysql-test/t/subselect3.test @@ -472,3 +472,20 @@ select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by grp) Z drop table t1,t2; +# +# BUG#24420: row-based IN suqueries with aggregation when the left operand +# of the subquery predicate may contain NULL values +# + +create table t1 (a int, b int); +insert into t1 values (0,0), (2,2), (3,3); +create table t2 (a int, b int); +insert into t2 values (1,1), (3,3); + +select a, b, (a,b) in (select a, min(b) from t2 group by a) Z from t1; + +insert into t2 values (NULL,4); +select a, b, (a,b) in (select a, min(b) from t2 group by a) Z from t1; + +drop table t1,t2; + -- cgit v1.2.1