~jaypipes/drizzle/transaction_log

« back to all changes in this revision

Viewing changes to tests/r/select.result

  • Committer: Jay Pipes
  • Date: 2009-12-22 03:07:38 UTC
  • mfrom: (1143.14.85 build)
  • Revision ID: jpipes@serialcoder-20091222030738-gnb0vyg77fmkt4cj
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
3661
3661
4
3662
3662
5
3663
3663
DROP TABLE t1;
 
3664
CREATE TABLE t1 (a INT);
 
3665
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
 
3666
CREATE TABLE t2 (b INT);
 
3667
INSERT INTO t2 VALUES (2);
 
3668
SELECT * FROM t1 WHERE a = 1 + 1;
 
3669
a
 
3670
2
 
3671
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = 1 + 1;
 
3672
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
 
3673
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    10      100.00  Using where
 
3674
Warnings:
 
3675
Note    1003    select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = <cache>((1 + 1)))
 
3676
SELECT * FROM t1 HAVING a = 1 + 1;
 
3677
a
 
3678
2
 
3679
EXPLAIN EXTENDED SELECT * FROM t1 HAVING a = 1 + 1;
 
3680
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
 
3681
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    10      100.00  
 
3682
Warnings:
 
3683
Note    1003    select `test`.`t1`.`a` AS `a` from `test`.`t1` having (`test`.`t1`.`a` = <cache>((1 + 1)))
 
3684
SELECT * FROM t1, t2 WHERE a = b + (1 + 1);
 
3685
a       b
 
3686
4       2
 
3687
EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a = b + (1 + 1);
 
3688
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
 
3689
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1       100.00  
 
3690
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    10      100.00  Using where; Using join buffer
 
3691
Warnings:
 
3692
Note    1003    select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where (`test`.`t1`.`a` = (`test`.`t2`.`b` + <cache>((1 + 1))))
 
3693
SELECT * FROM t2 LEFT JOIN t1 ON a = b + 1;
 
3694
b       a
 
3695
2       3
 
3696
EXPLAIN EXTENDED SELECT * FROM t2 LEFT JOIN t1 ON a = b + 1;
 
3697
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
 
3698
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1       100.00  
 
3699
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    10      100.00  
 
3700
Warnings:
 
3701
Note    1003    select `test`.`t2`.`b` AS `b`,`test`.`t1`.`a` AS `a` from `test`.`t2` left join `test`.`t1` on((`test`.`t1`.`a` = (`test`.`t2`.`b` + 1))) where 1
 
3702
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > UNIX_TIMESTAMP('2009-03-10 00:00:00');
 
3703
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
 
3704
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    10      100.00  Using where
 
3705
Warnings:
 
3706
Note    1003    select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` > <cache>(unix_timestamp('2009-03-10 00:00:00')))