Skip to content
Permalink
Browse files
MDEV-21541: main.sum_distinct-big fails with Assertion `m_buffer_end …
…== __null || end <= m_buffer_end'

For Merge_chuck structures first set the start and end positions of the buffer and
then adjust the end positions of the buffer if the records are dynamic in nature.
  • Loading branch information
Varun Gupta committed Jan 22, 2020
1 parent daf28db commit 39e4fe8
Showing 1 changed file with 2 additions and 2 deletions.
@@ -528,8 +528,8 @@ static bool merge_walk(uchar *merge_buffer, size_t merge_buffer_size,
*/
for (top= begin; top != end; ++top)
{
top->set_buffer_start(merge_buffer + (top - begin) * piece_size);
top->set_buffer_end(top->buffer_start() + piece_size);
top->set_buffer(merge_buffer + (top - begin) * piece_size,
merge_buffer + (top - begin) * piece_size + piece_size);
top->set_max_keys(max_key_count_per_piece);
bytes_read= read_to_buffer(file, top, &sort_param);
if (unlikely(bytes_read == (ulong) -1))

0 comments on commit 39e4fe8

Please sign in to comment.