summaryrefslogtreecommitdiff
path: root/mysql-test/r/distinct.result
diff options
context:
space:
mode:
authorunknown <holyfoot@deer.(none)>2006-03-05 20:48:31 +0400
committerunknown <holyfoot@deer.(none)>2006-03-05 20:48:31 +0400
commit9c7ef53a651b62ffcee35b88d9566bc64c26d60c (patch)
tree7a3b57f4569f99339619fa489254c48a54c56ae8 /mysql-test/r/distinct.result
parentd95921376ca02d79009995a10cd2925a656a703d (diff)
downloadmariadb-git-9c7ef53a651b62ffcee35b88d9566bc64c26d60c.tar.gz
bug #15745 (COUNT(DISTINCT CONCAT(x,y)) returns wrong result
mysql-test/r/distinct.result: result added mysql-test/t/distinct.test: testcase sql/item_sum.cc: MYSQL_TYPE_VARCHAR can't be 'binary' compared even when it is binary
Diffstat (limited to 'mysql-test/r/distinct.result')
-rw-r--r--mysql-test/r/distinct.result21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result
index 00436019f85..a6ad95570f8 100644
--- a/mysql-test/r/distinct.result
+++ b/mysql-test/r/distinct.result
@@ -512,3 +512,24 @@ id IFNULL(dsc, '-')
2 line number two
3 line number three
drop table t1;
+CREATE TABLE t1 (
+ID int(11) NOT NULL auto_increment,
+x varchar(20) default NULL,
+y decimal(10,0) default NULL,
+PRIMARY KEY (ID),
+KEY (y)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+INSERT INTO t1 VALUES
+(1,'ba','-1'),
+(2,'ba','1150'),
+(306,'ba','-1'),
+(307,'ba','1150'),
+(611,'ba','-1'),
+(612,'ba','1150');
+select count(distinct x,y) from t1;
+count(distinct x,y)
+2
+select count(distinct concat(x,y)) from t1;
+count(distinct concat(x,y))
+2
+drop table t1;