summaryrefslogtreecommitdiff
path: root/mysql-test/r/distinct.result
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-08-19 01:57:22 -0700
committerunknown <igor@rurik.mysql.com>2005-08-19 01:57:22 -0700
commit01f4258a02e01f578c0552089ef313ddc4bf95c5 (patch)
tree73ceffa736474b55dc22f451cee6db62f980d384 /mysql-test/r/distinct.result
parent496e86da3a2b0019a3d9c186063e2c4f56b2bb44 (diff)
downloadmariadb-git-01f4258a02e01f578c0552089ef313ddc4bf95c5.tar.gz
distinct.test, distinct.result:
Added test cases for bug #12625. sql_select.cc: Fixed bug #12625. Fixed invalid removal of constant items from the DISTINCT list in the function create_distinct_group. sql/sql_select.cc: Fixed bug #12625. mysql-test/r/distinct.result: Added test cases for bug #12625. mysql-test/t/distinct.test: Added test cases for bug #12625.
Diffstat (limited to 'mysql-test/r/distinct.result')
-rw-r--r--mysql-test/r/distinct.result40
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result
index f4bc4263c4d..8932285b5d0 100644
--- a/mysql-test/r/distinct.result
+++ b/mysql-test/r/distinct.result
@@ -464,3 +464,43 @@ SELECT DISTINCT html,SUM(out)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin;
html prod
1 0.00
drop table t1;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+SELECT DISTINCT a, 1 FROM t1;
+a 1
+1 1
+2 1
+3 1
+4 1
+5 1
+SELECT DISTINCT 1, a FROM t1;
+1 a
+1 1
+1 2
+1 3
+1 4
+1 5
+CREATE TABLE t2 (a int, b int);
+INSERT INTO t2 VALUES (1,1),(2,2),(2,3),(2,4),(3,5);
+SELECT DISTINCT a, b, 2 FROM t2;
+a b 2
+1 1 2
+2 2 2
+2 3 2
+2 4 2
+3 5 2
+SELECT DISTINCT 2, a, b FROM t2;
+2 a b
+2 1 1
+2 2 2
+2 2 3
+2 2 4
+2 3 5
+SELECT DISTINCT a, 2, b FROM t2;
+a 2 b
+1 2 1
+2 2 2
+2 2 3
+2 2 4
+3 2 5
+DROP TABLE t1,t2;