~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_group.result

  • Committer: Lee Bieber
  • Date: 2010-10-27 18:28:56 UTC
  • mfrom: (1883.1.3 build)
  • Revision ID: kalebral@gmail.com-20101027182856-q3wqtbv1t4egkjsk
Merge Andrew - fix bug 667360: --defaults-file not processed before paths read           
Merge Andrew - fix bug 656577: Importing SQL script results in silent failure    
Merge Andrew - fix bug 667053: drizzledump minor output cleanup needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
select max(t1.a1), max(t2.a2) from t1, t2;
177
177
max(t1.a1)      max(t2.a2)
178
178
NULL    NULL
179
 
select max(t1.a1) from t1, t2 where t1.a1 > 0;
 
179
select max(t1.a1) from t1, t2;
180
180
max(t1.a1)
181
181
NULL
182
182
select max(t2.a2), max(t1.a1) from t1, t2;
190
190
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    No matching min/max row
191
191
insert into t2 values('AAA', 10, 0.5);
192
192
insert into t2 values('BBB', 20, 1.0);
193
 
select t1.a1, t1.a2, t2.a1, t2.a2 from t1,t2 where t1.a1 > 0;
 
193
select t1.a1, t1.a2, t2.a1, t2.a2 from t1,t2;
194
194
a1      a2      a1      a2
195
195
10      NULL    AAA     10
196
196
10      NULL    BBB     20
529
529
explain 
530
530
select min(a1) from t1 where a1 > 'KKK' or a1 < 'XXX';
531
531
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
532
 
1       SIMPLE  t1      index   PRIMARY PRIMARY 14      NULL    15      Using where; Using index
 
532
1       SIMPLE  t1      range   PRIMARY PRIMARY 0       NULL    7       Using where; Using index
533
533
explain 
534
534
select min(a1) from t1 where a1 != 'KKK';
535
535
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
578
578
explain
579
579
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
580
580
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
581
 
1       SIMPLE  t2      range   k2      k2      15      NULL    6       Using where; Using index
 
581
1       SIMPLE  t2      index   k2      PRIMARY 14      NULL    7       Using where
582
582
1       SIMPLE  t1      index   NULL    PRIMARY 14      NULL    15      Using index; Using join buffer
583
583
drop table t1, t2;
584
584
create table t1 (a char);
1223
1223
INSERT INTO t2 ( a, b, c ) VALUES ( 1, NULL, 2 ), ( 1, 3, 4 ), ( 1, 4, 4 );
1224
1224
EXPLAIN SELECT MIN(b), MIN(c) FROM t2 WHERE a = 1;
1225
1225
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1226
 
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    3       Using where
 
1226
1       SIMPLE  t2      ref     a       a       5       const   1       Using where
1227
1227
SELECT MIN(b), MIN(c) FROM t2 WHERE a = 1;
1228
1228
MIN(b)  MIN(c)
1229
1229
3       2