diff options
author | unknown <pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2005-08-20 16:38:55 -0400 |
---|---|---|
committer | unknown <pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2005-08-20 16:38:55 -0400 |
commit | b221b549dd696fc62746f0952fb311a6204535ad (patch) | |
tree | b1d89aa88573d321fecce3d621fab7eea24781c1 /mysql-test/t/distinct.test | |
parent | fbaf5b04a91e951f5b88d1e494b9697a6d5a44b9 (diff) | |
parent | ad8c5c9df914366314cd01832521c818b997a21e (diff) | |
download | mariadb-git-b221b549dd696fc62746f0952fb311a6204535ad.tar.gz |
Merge c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-4.1
into c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0
heap/hp_delete.c:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/distinct.result:
Manual merge
mysql-test/t/distinct.test:
Manual merge
Diffstat (limited to 'mysql-test/t/distinct.test')
-rw-r--r-- | mysql-test/t/distinct.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index 562926d160c..6483284633f 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -334,6 +334,22 @@ SELECT DISTINCT html,SUM(rout)/(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; + # Bug 9784 DISTINCT IFNULL truncates data # create table t1 (id int, dsc varchar(50)); |