~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/pbxt/distinct.result

  • Committer: Brian Aker
  • Date: 2010-07-30 20:31:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1679.
  • Revision ID: brian@gaz-20100730203119-89g2ye4zwnvcacxg
First pass in encapsulating row

Show diffs side-by-side

added added

removed removed

Lines of Context:
173
173
INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2');
174
174
explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
175
175
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
176
 
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    5       Using temporary
177
 
1       SIMPLE  t3      ALL     a       NULL    NULL    NULL    6       Using join buffer
178
 
1       SIMPLE  t1      eq_ref  PRIMARY PRIMARY 4       test.t2.a       1       Using where; Distinct
 
176
1       SIMPLE  t1      ALL     PRIMARY NULL    NULL    NULL    4       Using temporary
 
177
1       SIMPLE  t2      ref     a       a       4       test.t1.a       1       
 
178
1       SIMPLE  t3      ref     a       a       5       test.t1.b       1       
179
179
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
180
180
a
181
181
1
190
190
explain select distinct t1.a from t1,t3 where t1.a=t3.a;
191
191
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
192
192
1       SIMPLE  t1      ALL     PRIMARY NULL    NULL    NULL    4       Using temporary
193
 
1       SIMPLE  t3      ref     a       a       5       test.t1.a       11      Using where; Distinct
 
193
1       SIMPLE  t3      ref     a       a       5       test.t1.a       1       Distinct
194
194
select distinct t1.a from t1,t3 where t1.a=t3.a;
195
195
a
196
196
1
397
397
SELECT DISTINCTROW email, shipcode FROM t1, t2 WHERE t1.infoID=t2.infoID;
398
398
email   shipcode
399
399
test1@testdomain.com    Z001
 
400
test2@testdomain.com    Z001
400
401
test2@testdomain.com    R002
401
 
test2@testdomain.com    Z001
402
402
test3@testdomain.com    Z001
403
403
SELECT DISTINCTROW email FROM t1 ORDER BY dateentered DESC;
404
404
email