• Varun Gupta's avatar
    MDEV-22390: Assertion `m_next_rec_ptr >= m_rawmem' failed in... · 6163af93
    Varun Gupta authored
    MDEV-22390: Assertion `m_next_rec_ptr >= m_rawmem' failed in Filesort_buffer::spaceleft | SIGSEGV in __memmove_avx_unaligned_erms from my_b_write
    
    Make sure that the sort_buffer that is allocated has atleast space for MERGEBUFF2 keys.
    The issue here was that the record length is quite high and sort buffer size is very small,
    due to which we end up with zero number of keys in the sort buffer. The Sort_param::max_keys_per_buffer
    was zero in such a case, due to which we were flushing empty sort_buffer to the disk.
    6163af93
filesort_utils.cc 4.5 KB