1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

bug #15745 (COUNT(DISTINCT CONCAT(x,y)) returns wrong result

This commit is contained in:
holyfoot@deer.(none)
2006-03-05 20:48:31 +04:00
parent 1a07140515
commit a920d0df86
3 changed files with 48 additions and 3 deletions

View File

@ -358,3 +358,27 @@ select distinct id, IFNULL(dsc, '-') from t1;
drop table t1;
# End of 4.1 tests
#
# Bug #15745 ( COUNT(DISTINCT CONCAT(x,y)) returns wrong result)
#
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;
select count(distinct concat(x,y)) from t1;
drop table t1;