~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/sum_distinct.test

  • Committer: Andrew Hutchings
  • Date: 2010-12-15 18:59:55 UTC
  • mto: This revision was merged to the branch mainline in revision 2006.
  • Revision ID: andrew@linuxjedi.co.uk-20101215185955-q12lkja8hdnpjqg7
Make the test look for drizzleadmin failure instead of success as this test is not possible to fix for success on our FreeBSD 8.0 box

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
  SUM(DISTINCT LENGTH(g1.name)) s1,
57
57
  SUM(DISTINCT SUBSTRING(g2.name, 1, 3)) s2,
58
58
  SUM(DISTINCT LENGTH(SUBSTRING(g3.name, 1, 4))) s3
59
 
FROM t1 g1 CROSS JOIN t1 g2 CROSS JOIN t1 g3;
 
59
FROM t1 g1, t1 g2, t1 g3;
60
60
 
61
61
SELECT
62
62
  SQL_BIG_RESULT
63
63
  SUM(DISTINCT LENGTH(g1.name)) s1,
64
64
  SUM(DISTINCT SUBSTRING(g2.name, 1, 3)) s2,
65
65
  SUM(DISTINCT LENGTH(SUBSTRING(g3.name, 1, 4))) s3
66
 
FROM t1 g1 CROSS JOIN t1 g2 CROSS JOIN t1 g3 GROUP BY LENGTH(SUBSTRING(g3.name, 5, 10));
 
66
FROM t1 g1, t1 g2, t1 g3 GROUP BY LENGTH(SUBSTRING(g3.name, 5, 10));
67
67
 
68
68
# here we explicitly request summing through temporary table (so
69
69
# Item_sum_sum_distinct::copy_or_same() is called)
78
78
  SUM(DISTINCT LENGTH(g1.name)) s1,
79
79
  SUM(DISTINCT SUBSTRING(g2.name, 1, 3)) s2,
80
80
  SUM(DISTINCT LENGTH(SUBSTRING(g3.name, 1, 4))) s3
81
 
FROM t1 g1 CROSS JOIN t1 g2 CROSS JOIN t1 g3 GROUP BY LENGTH(SUBSTRING(g3.name, 5, 10));
 
81
FROM t1 g1, t1 g2, t1 g3 GROUP BY LENGTH(SUBSTRING(g3.name, 5, 10));
82
82
 
83
83
# this test demonstrates that strings are automatically converted to numbers
84
84
# before summing