Commit d1bb7f91 authored by Monty's avatar Monty

Fixed memory leak in item_sum.cc::report_cut_value_error()

Only affects DBUG builds
parent d09dd5e8
......@@ -3737,13 +3737,16 @@ static void report_cut_value_error(THD *thd, uint row_count, const char *fname)
{
size_t fn_len= strlen(fname);
char *fname_upper= (char *) my_alloca(fn_len + 1);
fname_upper[fn_len]= 0;
for (; fn_len; fn_len--)
fname_upper[fn_len-1]= my_toupper(&my_charset_latin1, fname[fn_len-1]);
if (!fname_upper)
fname_upper= (char*) fname; // Out of memory
else
memcpy(fname_upper, fname, fn_len+1);
my_caseup_str(&my_charset_latin1, fname_upper);
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_CUT_VALUE_GROUP_CONCAT,
ER_THD(thd, ER_CUT_VALUE_GROUP_CONCAT),
row_count, fname_upper);
my_afree(fname_upper);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment