~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/subselect.result

  • Committer: Joseph Daly
  • Date: 2010-08-19 01:17:00 UTC
  • mfrom: (1718 drizzle)
  • mto: (1725.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1726.
  • Revision ID: jdaly@rx7-20100819011700-zmv90s31dfjex4vu
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
704
704
1
705
705
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1);
706
706
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
707
 
1       PRIMARY t2      ref     id      id      5       const   1       100.00  Using index
 
707
1       PRIMARY t2      ref     id      id      5       const   1       100.00  Using where; Using index
708
708
Warnings:
709
709
Note    1249    Select 2 was reduced during optimization
710
710
Note    1003    select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = 1)
716
716
2
717
717
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1));
718
718
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
719
 
1       PRIMARY t2      ref     id      id      5       const   1       100.00  Using index
 
719
1       PRIMARY t2      ref     id      id      5       const   1       100.00  Using where; Using index
720
720
Warnings:
721
721
Note    1249    Select 3 was reduced during optimization
722
722
Note    1249    Select 2 was reduced during optimization
892
892
explain extended SELECT t1.a, t1.a in (select t2.a from t2,t3 where t3.a=t2.a) FROM t1;
893
893
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
894
894
1       PRIMARY t1      index   NULL    PRIMARY 4       NULL    4       100.00  Using index
895
 
2       DEPENDENT SUBQUERY      t2      ref_or_null     a       a       5       func    2       100.00  Using index
 
895
2       DEPENDENT SUBQUERY      t2      ref_or_null     a       a       5       func    2       100.00  Using where; Using index
896
896
2       DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    3       100.00  Using where; Using join buffer
897
897
Warnings:
898
898
Note    1003    select `test`.`t1`.`a` AS `a`,<in_optimizer>(`test`.`t1`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t2` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t2`.`a`) and ((<cache>(`test`.`t1`.`a`) = `test`.`t2`.`a`) or isnull(`test`.`t2`.`a`))) having <is_not_null_test>(`test`.`t2`.`a`))) AS `t1.a in (select t2.a from t2,t3 where t3.a=t2.a)` from `test`.`t1`
1434
1434
1       PRIMARY t3      ALL     NULL    NULL    NULL    NULL    3       100.00  Using where
1435
1435
2       SUBQUERY        t2      system  NULL    NULL    NULL    NULL    0       0.00    const row not found
1436
1436
Warnings:
1437
 
Note    1003    select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>((`test`.`t3`.`a` < (select max('0') from `test`.`t2`)))
 
1437
Note    1003    select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>((`test`.`t3`.`a` < (select max(NULL) from `test`.`t2`)))
1438
1438
select * from t3 where a >= some (select b from t2);
1439
1439
a
1440
1440
explain extended select * from t3 where a >= some (select b from t2);
1442
1442
1       PRIMARY t3      ALL     NULL    NULL    NULL    NULL    3       100.00  Using where
1443
1443
2       SUBQUERY        t2      system  NULL    NULL    NULL    NULL    0       0.00    const row not found
1444
1444
Warnings:
1445
 
Note    1003    select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>((`test`.`t3`.`a` >= (select min('0') from `test`.`t2`)))
 
1445
Note    1003    select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>((`test`.`t3`.`a` >= (select min(NULL) from `test`.`t2`)))
1446
1446
select * from t3 where a >= all (select b from t2 group by 1);
1447
1447
a
1448
1448
6
1453
1453
1       PRIMARY t3      ALL     NULL    NULL    NULL    NULL    3       100.00  Using where
1454
1454
2       SUBQUERY        t2      system  NULL    NULL    NULL    NULL    0       0.00    const row not found
1455
1455
Warnings:
1456
 
Note    1003    select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>((`test`.`t3`.`a` < <max>(select '0' AS `b` from `test`.`t2` group by 1)))
 
1456
Note    1003    select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>((`test`.`t3`.`a` < <max>(select NULL AS `b` from `test`.`t2` group by 1)))
1457
1457
select * from t3 where a >= some (select b from t2 group by 1);
1458
1458
a
1459
1459
explain extended select * from t3 where a >= some (select b from t2 group by 1);
1461
1461
1       PRIMARY t3      ALL     NULL    NULL    NULL    NULL    3       100.00  Using where
1462
1462
2       SUBQUERY        t2      system  NULL    NULL    NULL    NULL    0       0.00    const row not found
1463
1463
Warnings:
1464
 
Note    1003    select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>((`test`.`t3`.`a` >= <min>(select '0' AS `b` from `test`.`t2` group by 1)))
 
1464
Note    1003    select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>((`test`.`t3`.`a` >= <min>(select NULL AS `b` from `test`.`t2` group by 1)))
1465
1465
select * from t3 where NULL >= any (select b from t2);
1466
1466
a
1467
1467
explain extended select * from t3 where NULL >= any (select b from t2);