summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_group.result
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2013-05-03 16:07:13 +0300
committerunknown <sanja@askmonty.org>2013-05-03 16:07:13 +0300
commit682c8a36ca503f53db50628463424f205b609ab0 (patch)
tree2d99dc5d2696f3441d0a694f5da8ec9b09cbe9eb /mysql-test/r/func_group.result
parent1a7c4ac7ae5534381285f501afadae297cff3e4c (diff)
downloadmariadb-git-682c8a36ca503f53db50628463424f205b609ab0.tar.gz
MDEV-4290:
Fix agregate function resolution in derived tables (no name resolution over a derived table border)
Diffstat (limited to 'mysql-test/r/func_group.result')
-rw-r--r--mysql-test/r/func_group.result28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index bd77f800f67..5fa37f577e9 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -2097,3 +2097,31 @@ avg(export_set( 3, 'y', sha(i))) group_concat(d)
0 2008-10-02
0 2010-12-12
drop table t1;
+#
+# MDEV-4290: crash in st_select_lex::mark_as_dependent
+#
+create table `t1`(`a` int);
+select 1 from t1 v1 right join t1 on count(*);
+ERROR HY000: Invalid use of group function
+select 1 from t1 order by
+(
+select 1 from
+(
+select 1 from t1 v1 right join t1 on count(*)
+) v
+);
+ERROR HY000: Invalid use of group function
+insert into t1 values (1),(1),(2),(2);
+select count(*) from t1;
+count(*)
+4
+select z from (select count(*) as z from t1) v;
+z
+4
+# next is how it implemented now (may be changed in case of dependent
+# derived tables)
+select z from (select count(*) as z from t1) v group by 1;
+z
+4
+drop table t1;
+# end of 5.3 tests