mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Call alloc() instead of realloc()
Use alloc() if we don't need original string (avoid copy) Removed not needed test of str_length in sql_string.cc
This commit is contained in:
@ -3220,7 +3220,7 @@ int select_export::send_data(List<Item> &items)
|
||||
((uint64) res->length() / res->charset()->mbminlen + 1) *
|
||||
write_cs->mbmaxlen + 1;
|
||||
set_if_smaller(estimated_bytes, UINT_MAX32);
|
||||
if (cvt_str.realloc((uint32) estimated_bytes))
|
||||
if (cvt_str.alloc((uint32) estimated_bytes))
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), (uint32) estimated_bytes);
|
||||
goto err;
|
||||
|
Reference in New Issue
Block a user