412
412
const charset_info_st * const cs= copy->from_field->charset();
413
413
const unsigned char *from_end= copy->from_ptr + copy->from_length;
414
uint32_t copy_length= cs->cset->well_formed_len(*cs, str_ref(copy->from_ptr, from_end), copy->to_length / cs->mbmaxlen, &well_formed_error);
415
419
if (copy->to_length < copy_length)
416
420
copy_length= copy->to_length;
417
421
memcpy(copy->to_ptr, copy->from_ptr, copy_length);