~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/sum.cc

  • Committer: Monty Taylor
  • Date: 2009-06-08 18:19:53 UTC
  • mto: This revision was merged to the branch mainline in revision 1060.
  • Revision ID: mordred@inaugust.com-20090608181953-9n1u3im0kezu2aoy
Removed copy_and_convert.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3182
3182
  null_value= 1;
3183
3183
  max_length= (size_t)session->variables.group_concat_max_len;
3184
3184
 
3185
 
  uint32_t offset;
3186
 
  if (separator->needs_conversion(separator->length(), separator->charset(),
3187
 
                                  collation.collation, &offset))
3188
 
  {
3189
 
    uint32_t buflen= collation.collation->mbmaxlen * separator->length();
3190
 
    uint32_t errors, conv_length;
3191
 
    char *buf;
3192
 
    String *new_separator;
3193
 
 
3194
 
    if (!(buf= (char*) session->alloc(buflen)) ||
3195
 
        !(new_separator= new(session->mem_root)
3196
 
                           String(buf, buflen, collation.collation)))
3197
 
      return true;
3198
 
 
3199
 
    conv_length= copy_and_convert(buf, buflen, collation.collation,
3200
 
                                  separator->ptr(), separator->length(),
3201
 
                                  separator->charset(), &errors);
3202
 
    new_separator->length(conv_length);
3203
 
    separator= new_separator;
3204
 
  }
3205
 
 
3206
3185
  if (check_sum_func(session, ref))
3207
3186
    return true;
3208
3187