~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/distinct.test

  • Committer: Brian Aker
  • Date: 2009-08-18 07:20:29 UTC
  • mfrom: (1117.1.9 merge)
  • Revision ID: brian@gaz-20090818072029-s9ch5lcmltxwidn7
Merge of Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
explain select distinct t1.a from t1,t3 where t1.a=t3.a;
87
87
#flush status;
88
88
select distinct t1.a from t1,t3 where t1.a=t3.a;
89
 
--replace_column 2 #
90
 
show status like 'Handler%';
91
 
flush status;
 
89
#show status like 'Handler%';
 
90
#flush status;
92
91
select distinct 1 from t1,t3 where t1.a=t3.a;
93
 
--replace_column 2 #
94
 
show status like 'Handler%';
 
92
#show status like 'Handler%';
95
93
 
96
94
explain SELECT distinct t1.a from t1;
97
95
explain SELECT distinct t1.a from t1 order by a desc;
235
233
      (1, 'Z001'),
236
234
      (2, 'R002');
237
235
 
238
 
--sorted_result
239
236
SELECT DISTINCTROW email, shipcode FROM t1, t2 WHERE t1.infoID=t2.infoID;
240
237
SELECT DISTINCTROW email FROM t1 ORDER BY dateentered DESC;
241
238
SELECT DISTINCTROW email, shipcode FROM t1, t2 WHERE t1.infoID=t2.infoID ORDER BY dateentered DESC;
345
342
INSERT INTO t1 VALUES (1,1), (2,1), (3,1);
346
343
EXPLAIN SELECT DISTINCT a FROM t1;
347
344
EXPLAIN SELECT DISTINCT a,b FROM t1;
348
 
--error ER_CARTESIAN_JOIN_ATTEMPTED
349
345
EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2;
350
 
--sorted_result
351
346
EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2
352
347
  WHERE t1_1.a = t1_2.a;
353
348
EXPLAIN SELECT a FROM t1 GROUP BY a;