summaryrefslogtreecommitdiff
path: root/mysql-test/t/distinct.test
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2005-08-19 20:21:09 -0700
committerigor@rurik.mysql.com <>2005-08-19 20:21:09 -0700
commitc4f677feb5f3ae609e26d5dbcbf02d7499415db5 (patch)
tree235244822bb31efacb87fd7285ea4e58736f8d19 /mysql-test/t/distinct.test
parent00fd26baeb7b707d75be4fc762a62f709b8f29a4 (diff)
parent2c2f18b98b3e7b078fc22afae3f53eaab432794d (diff)
downloadmariadb-git-c4f677feb5f3ae609e26d5dbcbf02d7499415db5.tar.gz
Manual merge
Diffstat (limited to 'mysql-test/t/distinct.test')
-rw-r--r--mysql-test/t/distinct.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index 562926d160c..cb256240c33 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -341,4 +341,21 @@ insert into t1 values (1, "line number one"), (2, "line number two"), (3, "line
select distinct id, IFNULL(dsc, '-') from t1;
drop table t1;
+#
+# Test cases for #12625: DISTINCT for a list with constants
+#
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+SELECT DISTINCT a, 1 FROM t1;
+SELECT DISTINCT 1, a FROM t1;
+
+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;
+SELECT DISTINCT 2, a, b FROM t2;
+SELECT DISTINCT a, 2, b FROM t2;
+
+DROP TABLE t1,t2;
+
# End of 4.1 tests