| 3260 | |
| 3261 | |
| 3262 | inline String* alloc_buffer(String *res,String *str,String *tmp_value, |
| 3263 | ulong length) |
| 3264 | { |
| 3265 | if (res->alloced_length() < length) |
| 3266 | { |
| 3267 | if (str->alloced_length() >= length) |
| 3268 | { |
| 3269 | (void) str->copy(*res); |
| 3270 | str->length(length); |
| 3271 | return str; |
| 3272 | } |
| 3273 | if (tmp_value->alloc(length)) |
| 3274 | return 0; |
| 3275 | (void) tmp_value->copy(*res); |
| 3276 | tmp_value->length(length); |
| 3277 | return tmp_value; |
| 3278 | } |
| 3279 | res->length(length); |
| 3280 | return res; |
| 3281 | } |
| 3282 | |
| 3283 | |
| 3284 | bool Item_func_repeat::fix_length_and_dec(THD *thd) |