| 75 | |
| 76 | |
| 77 | my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size) |
| 78 | { |
| 79 | DBUG_ENTER("dynstr_realloc"); |
| 80 | |
| 81 | if (!additional_size) DBUG_RETURN(FALSE); |
| 82 | if (str->length + additional_size > str->max_length) |
| 83 | { |
| 84 | str->max_length=((str->length + additional_size+str->alloc_increment-1)/ |
| 85 | str->alloc_increment)*str->alloc_increment; |
| 86 | if (!(str->str=(char*) my_realloc(key_memory_DYNAMIC_STRING, str->str, |
| 87 | str->max_length, MYF(MY_WME)))) |
| 88 | DBUG_RETURN(TRUE); |
| 89 | } |
| 90 | DBUG_RETURN(FALSE); |
| 91 | } |
| 92 | |
| 93 | |
| 94 | my_bool dynstr_append(DYNAMIC_STRING *str, const char *append) |
no test coverage detected