Commit 39e4fe8f authored by Varun Gupta's avatar Varun Gupta

MDEV-21541: main.sum_distinct-big fails with Assertion `m_buffer_end == __null...

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.
parent daf28db0
......@@ -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))
......
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