Commit 146b317d authored by unknown's avatar unknown

Bug#32798: DISTINCT in GROUP_CONCAT clause fails when ordering by

a column with null values

Post-merge fix


sql/item_sum.cc:
  Bug#32798:Post-merge fix
parent a9e05bf7
...@@ -2931,7 +2931,7 @@ int group_concat_key_cmp_with_order(void* arg, const void* key1, ...@@ -2931,7 +2931,7 @@ int group_concat_key_cmp_with_order(void* arg, const void* key1,
int res; int res;
uint offset= (field->offset(field->table->record[0]) - uint offset= (field->offset(field->table->record[0]) -
table->s->null_bytes); table->s->null_bytes);
if ((res= field->cmp(key1 + offset, key2 + offset))) if ((res= field->cmp((uchar*)key1 + offset, (uchar*)key2 + offset)))
return (*order_item)->asc ? res : -res; return (*order_item)->asc ? res : -res;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment