diff options
Diffstat (limited to 'mysql-test/t/distinct.test')
-rw-r--r-- | mysql-test/t/distinct.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index 476e4ce7735..7310f98cd16 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -540,3 +540,16 @@ EXPLAIN SELECT a FROM t1 GROUP BY a; SELECT a FROM t1 GROUP BY a; DROP TABLE t1; + +# +#Bug #27659: SELECT DISTINCT returns incorrect result set when field is +#repeated +# +# +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES(1,1),(1,2),(1,3); +SELECT DISTINCT a, b FROM t1; +SELECT DISTINCT a, a, b FROM t1; +DROP TABLE t1; + +--echo End of 5.0 tests |