1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +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

@@ -2541,9 +2541,9 @@ bool Item_sum_count_distinct::setup(THD *thd)
Field *f= *field;
enum enum_field_types type= f->type();
tree_key_length+= f->pack_length();
if (!f->binary() && (type == MYSQL_TYPE_STRING ||
type == MYSQL_TYPE_VAR_STRING ||
type == MYSQL_TYPE_VARCHAR))
if ((type == MYSQL_TYPE_VARCHAR) ||
!f->binary() && (type == MYSQL_TYPE_STRING ||
type == MYSQL_TYPE_VAR_STRING))
{
all_binary= FALSE;
break;