diff options
Diffstat (limited to 'mysql-test/t/distinct.test')
-rw-r--r-- | mysql-test/t/distinct.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index f05dd4b75a0..f2fe1ec6372 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -333,4 +333,21 @@ INSERT INTO t1 VALUES ('1',1,0); SELECT DISTINCT html,SUM(out)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin; 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 |