summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_group.result
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@macbook.gmz>2006-09-08 19:04:46 +0300
committerunknown <gkodinov/kgeorge@macbook.gmz>2006-09-08 19:04:46 +0300
commit2a00a073c2c07f2d73d60a6c74c538874f05158b (patch)
tree519a482cf3f960ebc2fae642985a0468e48ff105 /mysql-test/r/func_group.result
parentc17b36d9842703985a9f242515c811c660d6d074 (diff)
downloadmariadb-git-2a00a073c2c07f2d73d60a6c74c538874f05158b.tar.gz
Bug #21540: Subqueries with no from and aggregate functions return
wrong results Mark the containing Item(s) (Item_subselect descendant usually) of a subselect as containing aggregate functions if it has references to aggregates functions that are calculated outside its context. This tels end_send_group() not to make an Item_subselect descendant in select list a copy and causes the correct value being returned. mysql-test/r/func_group.result: Bug #21540: Subqueries with no from and aggregate functions return wrong results - test cases mysql-test/r/subselect.result: Bug #21540: Subqueries with no from and aggregate functions return wrong results - fixed the result of an existing testcase. mysql-test/t/subselect.test: Bug #21540: Subqueries with no from and aggregate functions return wrong results - test cases sql/item_sum.cc: Bug #21540: Subqueries with no from and aggregate functions return wrong results Mark the containing Item (Item_subselect descendant usually) of a subselect as containing aggregate functions if it has references to aggregates functions that are calculated outside its context. This tels end_send_group() not to make an Item_subselect descendant in select list a copy and causes the correct value being returned.
Diffstat (limited to 'mysql-test/r/func_group.result')
-rw-r--r--mysql-test/r/func_group.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index f57b4ad6ce9..da2a7518c86 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -997,7 +997,7 @@ SELECT SQL_NO_CACHE
WHERE ttt.a = ccc.b AND ttt.a = t.a GROUP BY ttt.a) AS minid
FROM t1 t, t2 c WHERE t.a = c.b;
minid
-NULL
+1
DROP TABLE t1,t2;
create table t1 select variance(0);
show create table t1;