~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-proposed

« back to all changes in this revision

Viewing changes to mysql-test/r/group_min_max.result

  • Committer: Package Import Robot
  • Author(s): Dave Chiluk, Eduardo Damato
  • Date: 2014-01-09 09:44:14 UTC
  • mfrom: (18.1.5 precise-security)
  • Revision ID: package-import@ubuntu.com-20140109094414-ght3gi7yvzsyvhm5
Tags: 5.5.34-0ubuntu0.12.04.2
[ Eduardo Damato ]
Fix upstart script to account for datadir disk shortage (LP: #1121874) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2858
2858
16
2859
2859
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10;
2860
2860
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2861
 
1       SIMPLE  t1      range   NULL    a       10      NULL    9       Using index for group-by
 
2861
1       SIMPLE  t1      index   NULL    a       10      NULL    16      Using index
2862
2862
SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10;
2863
2863
COUNT(DISTINCT a)
 
2864
2
2864
2865
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT c) < 10;
2865
2866
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2866
2867
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    16      
2994
2995
a       COUNT(DISTINCT a)       SUM(DISTINCT a)
2995
2996
EXPLAIN SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42;
2996
2997
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2997
 
1       SIMPLE  t2      range   NULL    a       10      NULL    9       Using where; Using index for group-by
 
2998
1       SIMPLE  t2      index   NULL    a       15      NULL    16      Using where; Using index
2998
2999
SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42;
2999
3000
COUNT(DISTINCT a, b)    SUM(DISTINCT a)
3000
3001
0       NULL