diff options
Diffstat (limited to 'mysql-test/r/func_group.result')
-rw-r--r-- | mysql-test/r/func_group.result | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index f1884df2452..38aa3f49c4d 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1837,10 +1837,10 @@ INSERT INTO t2 VALUES EXPLAIN EXTENDED SELECT MAX(a) FROM t1 WHERE (1,2) IN (SELECT 3,4) AND a<10; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 range a a 4 NULL 4 100.00 Using where; Using index +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select max(`test`.`t1`.`a`) AS `MAX(a)` from `test`.`t1` where (<cache>(<in_optimizer>((1,2),<exists>(select 3,4 having (((1 = 3) or isnull(3)) and ((2 = 4) or isnull(4)) and <is_not_null_test>(3) and <is_not_null_test>(4))))) and (`test`.`t1`.`a` < 10)) +Note 1003 select max(`test`.`t1`.`a`) AS `MAX(a)` from `test`.`t1` where 0 SELECT MAX(a) FROM t1 WHERE (1,2) IN (SELECT 3,4) AND a<10; MAX(a) NULL @@ -2090,6 +2090,41 @@ set @@optimizer_switch=@save_optimizer_switch; # Cleanup for BUG#46680 # DROP TABLE IF EXISTS t1,t2,t3,empty1; +create table t1 (i int, d date); +insert into t1 values (1, '2008-10-02'), (2, '2010-12-12'); +select avg(export_set( 3, 'y', sha(i))), group_concat(d) from t1 group by d order by i; +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 # # Bug#52123 Assertion failed: aggregator == aggr->Aggrtype(), # file .\item_sum.cc, line 587 |