• Marko Mäkelä's avatar
    MDEV-21749: page_cur_insert_rec_low(): Assertion rdm - rd + bd <= insert_buf + rec_size failed. · 0eca30a7
    Marko Mäkelä authored
    This bug was introduced in
    commit 7ae21b18
    (the main commit of MDEV-12353).
    
    page_cur_insert_rec_low(): Before entering the comparison loop, make sure
    that the range does not exceed c_end already at the start of the loop.
    The loop is only comparing for pointer equality, and that condition
    cdm == c_end would never hold if the end was already exceeded in
    the beginning. Also, skip the comparison altogether if we could find
    at most 2 equal bytes.
    
    PageBulk::insertPage(): Apply a similar change. It seems that this
    code was correct, because the loop checks for cdm < c_end.
    0eca30a7
page0cur.cc 74.3 KB