Commit 549ada35 authored by Igor Babaev's avatar Igor Babaev

Fixed valgrind complain on usage of uninitialized data.

parent 1db675b6
......@@ -6202,16 +6202,15 @@ double Field_str::middle_point_pos(Field *min, Field *max)
uchar minp_prefix[sizeof(ulonglong)];
uchar maxp_prefix[sizeof(ulonglong)];
ulonglong mp, minp, maxp;
uint dsz= min(field_length, sizeof(ulonglong) * charset()->mbmaxlen);
memset(mp_prefix, 0, sizeof(ulonglong));
memset(minp_prefix, 0, sizeof(ulonglong));
memset(maxp_prefix, 0, sizeof(ulonglong));
my_strnxfrm(charset(), mp_prefix, sizeof(mp),
ptr + length_size(), dsz);
ptr + length_size(),
data_length());
my_strnxfrm(charset(), minp_prefix, sizeof(minp),
min->ptr + length_size(), dsz);
min->ptr + length_size(),
min->data_length());
my_strnxfrm(charset(), maxp_prefix, sizeof(maxp),
max->ptr + length_size(), dsz);
max->ptr + length_size(),
max->data_length());
mp= char_prefix_to_ulonglong(mp_prefix);
minp= char_prefix_to_ulonglong(minp_prefix);
maxp= char_prefix_to_ulonglong(maxp_prefix);
......
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