Commit 758b68a9 authored by Sergey Petrunya's avatar Sergey Petrunya

Fix valgrind failure: don't access key_buffer if we haven't set it up yet.

parent e25db795
...@@ -822,7 +822,8 @@ void DsMrr_impl::dsmrr_fill_key_buffer() ...@@ -822,7 +822,8 @@ void DsMrr_impl::dsmrr_fill_key_buffer()
// reset the buffer for writing. // reset the buffer for writing.
key_buffer.reset_for_writing(); key_buffer.reset_for_writing();
while ((key_buffer.have_space_for(key_buff_elem_size)) && while ((key_tuple_length == 0 ||
key_buffer.have_space_for(key_buff_elem_size)) &&
!(res= h->mrr_funcs.next(h->mrr_iter, &cur_range))) !(res= h->mrr_funcs.next(h->mrr_iter, &cur_range)))
{ {
DBUG_ASSERT(cur_range.range_flag & EQ_RANGE); DBUG_ASSERT(cur_range.range_flag & EQ_RANGE);
......
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