Lines Matching refs:arg_length

36   size_t arg_length= ALIGN_SIZE(length + 1);  in real_alloc()  local
37 DBUG_ASSERT(arg_length > length); in real_alloc()
38 if (arg_length <= length) in real_alloc()
41 if (Alloced_length < arg_length) in real_alloc()
44 if (!(Ptr=(char*) my_malloc(arg_length,MYF(MY_WME | in real_alloc()
49 Alloced_length=(uint32) arg_length; in real_alloc()
246 bool Binary_string::copy(const char *str, size_t arg_length) in copy() argument
248 DBUG_ASSERT(arg_length < UINT_MAX32); in copy()
249 if (alloc(arg_length)) in copy()
251 if (Ptr == str && arg_length == uint32(str_length)) in copy()
258 str, arg_length)); in copy()
260 else if ((str_length=uint32(arg_length))) in copy()
261 memcpy(Ptr,str,arg_length); in copy()
262 Ptr[arg_length]=0; in copy()
272 bool Binary_string::copy_or_move(const char *str, size_t arg_length) in copy_or_move() argument
274 DBUG_ASSERT(arg_length < UINT_MAX32); in copy_or_move()
275 if (alloc(arg_length)) in copy_or_move()
277 if ((str_length=uint32(arg_length))) in copy_or_move()
278 memmove(Ptr,str,arg_length); in copy_or_move()
279 Ptr[arg_length]=0; in copy_or_move()
306 bool String::needs_conversion(size_t arg_length, in needs_conversion() argument
317 (!(*offset=(uint32)(arg_length % to_cs->mbminlen))))) in needs_conversion()
335 bool String::needs_conversion_on_storage(size_t arg_length, in needs_conversion_on_storage() argument
340 return (needs_conversion(arg_length, cs_from, cs_to, &offset) || in needs_conversion_on_storage()
352 0 != (arg_length % cs_to->mbmaxlen) in needs_conversion_on_storage()
384 bool String::copy_aligned(const char *str, size_t arg_length, size_t offset, in copy_aligned() argument
391 size_t aligned_length= arg_length + offset; in copy_aligned()
401 memcpy(Ptr + offset, str, arg_length); in copy_aligned()
410 bool String::set_or_copy_aligned(const char *str, size_t arg_length, in set_or_copy_aligned() argument
414 size_t offset= (arg_length % cs->mbminlen); in set_or_copy_aligned()
419 set(str, arg_length, cs); in set_or_copy_aligned()
422 return copy_aligned(str, arg_length, offset, cs); in set_or_copy_aligned()
436 bool String::copy(const char *str, size_t arg_length, in copy() argument
443 if (!needs_conversion(arg_length, from_cs, to_cs, &offset)) in copy()
446 return copy(str, arg_length, to_cs); in copy()
451 return copy_aligned(str, arg_length, offset, to_cs); in copy()
453 size_t new_length= to_cs->mbmaxlen*arg_length; in copy()
457 str, arg_length, from_cs, errors); in copy()
482 bool String::set_ascii(const char *str, size_t arg_length) in set_ascii() argument
486 set(str, arg_length, charset()); in set_ascii()
490 return copy(str, (uint32) arg_length, &my_charset_latin1, in set_ascii()
525 uint32 arg_length= (uint32) size; in append() local
526 if (!arg_length) in append()
534 uint32 add_length= arg_length * mbmaxlen(); in append()
539 s, arg_length, &my_charset_latin1, in append()
547 return Binary_string::append(s, arg_length); in append()
575 bool String::append(const char *s, size_t arg_length, CHARSET_INFO *cs) in append() argument
577 if (!arg_length) in append()
582 if (needs_conversion((uint32)arg_length, cs, charset(), &offset)) in append()
589 add_length= arg_length + offset; in append()
593 memcpy(Ptr + str_length + offset, s, arg_length); in append()
598 add_length= arg_length / cs->mbminlen * mbmaxlen(); in append()
603 s, (uint32)arg_length, cs, &dummy_errors); in append()
606 return Binary_string::append(s, arg_length); in append()
610 bool Binary_string::append(IO_CACHE* file, uint32 arg_length) in append() argument
612 if (realloc_with_extra_if_needed(str_length+arg_length)) in append()
614 if (my_b_read(file, (uchar*) Ptr + str_length, arg_length)) in append()
619 str_length+=arg_length; in append()
641 bool String::append_with_prefill(const char *s,uint32 arg_length, in append_with_prefill() argument
644 int t_length= arg_length > full_length ? arg_length : full_length; in append_with_prefill()
648 t_length= full_length - arg_length; in append_with_prefill()
654 append(s, arg_length); in append_with_prefill()
718 bool Binary_string::replace(uint32 offset, uint32 arg_length, in replace() argument
721 long diff = (long) to_length-(long) arg_length; in replace()
722 if (offset+arg_length <= str_length) in replace()
728 bmove(Ptr+offset+to_length,Ptr+offset+arg_length, in replace()
729 str_length-offset-arg_length); in replace()
738 str_length-offset-arg_length); in replace()