summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index a3a25ec8d6f..804adcd022d 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -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;