~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/subselect3.result

  • Committer: Brian Aker
  • Date: 2009-02-21 00:18:15 UTC
  • Revision ID: brian@tangent.org-20090221001815-x20e8h71e984lvs1
Completion (?) of uint conversion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
0
60
60
show status like 'Handler_read_rnd_next';
61
61
Variable_name   Value
62
 
Handler_read_rnd_next   #
 
62
Handler_read_rnd_next   11
63
63
select ' ^ This must show 11' Z;
64
64
Z
65
65
 ^ This must show 11
99
99
1       1
100
100
show status like '%Handler_read_rnd_next';
101
101
Variable_name   Value
102
 
Handler_read_rnd_next   #
 
102
Handler_read_rnd_next   11
103
103
delete from t2;
104
104
insert into t2 values (NULL, 0),(NULL, 0), (NULL, 0), (NULL, 0);
105
105
flush status;
111
111
0       NULL    0
112
112
show status like '%Handler_read%';
113
113
Variable_name   Value
114
 
Handler_read_first      #
115
 
Handler_read_key        #
116
 
Handler_read_next       #
117
 
Handler_read_prev       #
118
 
Handler_read_rnd        #
119
 
Handler_read_rnd_next   #
 
114
Handler_read_first      5
 
115
Handler_read_key        10
 
116
Handler_read_next       0
 
117
Handler_read_prev       0
 
118
Handler_read_rnd        0
 
119
Handler_read_rnd_next   29
120
120
select 'No key lookups, seq reads: 29= 5 reads from t2 + 4 * 6 reads from t1.' Z;
121
121
Z
122
122
No key lookups, seq reads: 29= 5 reads from t2 + 4 * 6 reads from t1.
247
247
NULL    1       100     0
248
248
NULL    2       100     NULL
249
249
create table t4 (x int);
250
 
insert into t4 select A.a + 10*B.a from t1 A CROSS JOIN t1 B;
 
250
insert into t4 select A.a + 10*B.a from t1 A, t1 B;
251
251
explain extended 
252
252
select a,b, oref, 
253
253
(a,b) in (select a,b from t1,t4 where c=t2.oref) Z 
515
515
dd      1       NULL    0
516
516
select oref, a, b from t2 where (a,b) in (select ie1,ie2 from t1 where oref=t2.oref);
517
517
oref    a       b
 
518
aa      1       1
518
519
ff      2       2
519
 
aa      1       1
520
520
select oref, a, b from t2 where (a,b) not in (select ie1,ie2 from t1 where oref=t2.oref);
521
521
oref    a       b
522
522
bb      2       1
560
560
dd      1       NULL    0
561
561
select oref, a, b from t2 where (a,b) in (select ie1,ie2 from t1 where oref=t2.oref);
562
562
oref    a       b
 
563
aa      1       1
563
564
ff      2       2
564
 
aa      1       1
565
565
select oref, a, b from t2 where (a,b) not in (select ie1,ie2 from t1 where oref=t2.oref);
566
566
oref    a       b
567
567
bb      2       1
772
772
DROP TABLE t1, t2;
773
773
create table t1 (a int, b decimal(13, 3));
774
774
insert into t1 values (1, 0.123);
775
 
select a, (select max(b) from t1) into outfile "DRIZZLETEST_VARDIR/subselect.out.file.1" from t1;
 
775
select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1;
776
776
delete from t1;
777
 
load data infile "DRIZZLETEST_VARDIR/subselect.out.file.1" into table t1;
 
777
load data infile "subselect.out.file.1" into table t1;
778
778
select * from t1;
779
779
a       b
780
780
1       0.123