Commit d4f057f2 authored by Sergey Petrunya's avatar Sergey Petrunya

More valgrind fixes

parent 3b85e019
...@@ -758,6 +758,10 @@ void DsMrr_impl::setup_buffer_sizes(key_range *sample_key) ...@@ -758,6 +758,10 @@ void DsMrr_impl::setup_buffer_sizes(key_range *sample_key)
key_buff_elem_size= key_size_in_keybuf + key_buff_elem_size= key_size_in_keybuf +
(int)is_mrr_assoc * sizeof(void*); (int)is_mrr_assoc * sizeof(void*);
KEY *key_info= &h->table->key_info[keyno];
index_ranges_unique= test(key_info->flags & HA_NOSAME &&
key_info->key_parts ==
my_count_bits(sample_key->keypart_map));
if (!do_rowid_fetch) if (!do_rowid_fetch)
{ {
/* Give all space to key buffer. */ /* Give all space to key buffer. */
...@@ -775,7 +779,6 @@ void DsMrr_impl::setup_buffer_sizes(key_range *sample_key) ...@@ -775,7 +779,6 @@ void DsMrr_impl::setup_buffer_sizes(key_range *sample_key)
uint rowid_buf_elem_size= h->ref_length + uint rowid_buf_elem_size= h->ref_length +
(int)is_mrr_assoc * sizeof(char*); (int)is_mrr_assoc * sizeof(char*);
KEY *key_info= &h->table->key_info[keyno];
/* /*
Use rec_per_key statistics as a basis to find out how many rowids Use rec_per_key statistics as a basis to find out how many rowids
we'll get for each key value. we'll get for each key value.
...@@ -810,11 +813,6 @@ void DsMrr_impl::setup_buffer_sizes(key_range *sample_key) ...@@ -810,11 +813,6 @@ void DsMrr_impl::setup_buffer_sizes(key_range *sample_key)
rowid_buffer_end= full_buf + bytes_for_rowids; rowid_buffer_end= full_buf + bytes_for_rowids;
rowid_buffer.set_buffer_space(full_buf, rowid_buffer_end, 1); rowid_buffer.set_buffer_space(full_buf, rowid_buffer_end, 1);
key_buffer.set_buffer_space(rowid_buffer_end, full_buf_end, -1); key_buffer.set_buffer_space(rowid_buffer_end, full_buf_end, -1);
index_ranges_unique= test(key_info->flags & HA_NOSAME &&
key_info->key_parts ==
my_count_bits(sample_key->keypart_map));
} }
......
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