~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/distinct.test

  • Committer: Olaf van der Spek
  • Date: 2011-02-12 18:24:24 UTC
  • mto: (2167.1.2 build) (2172.1.4 build)
  • mto: This revision was merged to the branch mainline in revision 2168.
  • Revision ID: olafvdspek@gmail.com-20110212182424-kgnm9osi7qo97at2
casts

Show diffs side-by-side

added added

removed removed

Lines of Context:
235
235
      (1, 'Z001'),
236
236
      (2, 'R002');
237
237
 
 
238
--sorted_result
238
239
SELECT DISTINCTROW email, shipcode FROM t1, t2 WHERE t1.infoID=t2.infoID;
239
240
SELECT DISTINCTROW email FROM t1 ORDER BY dateentered DESC;
240
241
SELECT DISTINCTROW email, shipcode FROM t1, t2 WHERE t1.infoID=t2.infoID ORDER BY dateentered DESC;
344
345
INSERT INTO t1 VALUES (1,1), (2,1), (3,1);
345
346
EXPLAIN SELECT DISTINCT a FROM t1;
346
347
EXPLAIN SELECT DISTINCT a,b FROM t1;
 
348
--error ER_CARTESIAN_JOIN_ATTEMPTED
347
349
EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2;
 
350
--sorted_result
348
351
EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2
349
352
  WHERE t1_1.a = t1_2.a;
350
353
EXPLAIN SELECT a FROM t1 GROUP BY a;