MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / set_or_copy_aligned

Method set_or_copy_aligned

sql/sql_string.cc:315–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313
314
315bool 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/**

Callers 1

Item_stringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected