| 313 | |
| 314 | |
| 315 | bool String::set_or_copy_aligned(const char *str,uint32 arg_length, |
| 316 | const CHARSET_INFO *cs) |
| 317 | { |
| 318 | /* How many bytes are in incomplete character */ |
| 319 | uint32 offset= (arg_length % cs->mbminlen); |
| 320 | |
| 321 | if (!offset) /* All characters are complete, just copy */ |
| 322 | { |
| 323 | set(str, arg_length, cs); |
| 324 | return FALSE; |
| 325 | } |
| 326 | return copy_aligned(str, arg_length, offset, cs); |
| 327 | } |
| 328 | |
| 329 | |
| 330 | /** |