summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-11-08 22:08:50 +0400
committerunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-11-08 22:08:50 +0400
commita39b8a064ed1cd200e34be4ee0af078da7b2412c (patch)
tree384124ba4e5ccf6c8a5d7409308371dc47366c7d /sql/item_sum.cc
parent6bae01057c58190eba25a4ca93ae6caa4584872b (diff)
downloadmariadb-git-a39b8a064ed1cd200e34be4ee0af078da7b2412c.tar.gz
after merge fix for bug 23451.
sql/item_sum.cc: after merge fix.
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 000a8ce4b10..f1e0001c994 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -3038,7 +3038,7 @@ int dump_leaf_key(byte* key, element_count count __attribute__((unused)),
{
int well_formed_error;
CHARSET_INFO *cs= item->collation.collation;
- const char *ptr= item->result.ptr();
+ const char *ptr= result->ptr();
uint add_length;
/*
It's ok to use item->result.length() as the fourth argument
@@ -3047,10 +3047,10 @@ int dump_leaf_key(byte* key, element_count count __attribute__((unused)),
*/
add_length= cs->cset->well_formed_len(cs,
ptr + old_length,
- ptr + item->group_concat_max_len,
- item->result.length(),
+ ptr + item->max_length,
+ result->length(),
&well_formed_error);
- item->result.length(old_length + add_length);
+ result->length(old_length + add_length);
item->count_cut_values++;
item->warning_for_row= TRUE;
return 1;
@@ -3310,7 +3310,8 @@ bool Item_func_group_concat::setup(THD *thd)
DBUG_RETURN(TRUE);
/* We'll convert all blobs to varchar fields in the temporary table */
- tmp_table_param->convert_blob_length= max_length;
+ tmp_table_param->convert_blob_length= max_length *
+ collation.collation->mbmaxlen;
/* Push all not constant fields to the list and create a temp table */
always_null= 0;
for (uint i= 0; i < arg_count_field; i++)