diff options
Diffstat (limited to 'mysql-test/t/group_min_max.test')
-rw-r--r-- | mysql-test/t/group_min_max.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test index 677b3ecf7ec..5b48f89470d 100644 --- a/mysql-test/t/group_min_max.test +++ b/mysql-test/t/group_min_max.test @@ -372,6 +372,17 @@ select a1,a2,b,min(c),max(c) from t2 where (c > 'b111') and (c <= 'g112') group select a1,a2,b,min(c),max(c) from t2 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b; select a1,a2,b,min(c),max(c) from t2 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b; +#-- analyze the sub-select +#explain select a1,a2,b,min(c),max(c) from t1 +#where exists ( select * from t2 where t2.c = t1.c ) +#group by a1,a2,b; + +#-- the sub-select is unrelated to MIN/MAX +#explain select a1,a2,b,min(c),max(c) from t1 +#where exists ( select * from t2 where t2.c > 'b1' ) +#group by a1,a2,b; + + -- A,B,C) Predicates referencing mixed classes of attributes -- plans explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; @@ -463,6 +474,11 @@ select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121 select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); select distinct b from t2 where (a2 >= 'b') and (b = 'a'); +#-- BUG 6303 +#select distinct t_00.a1 +#from t1 t_00 +#where exists ( select * from t2 where a1 = t_00.a1 ); + -- -- DISTINCT queries with GROUP-BY |