• Igor Babaev's avatar
    Fixed LP bug #663840. · ca862231
    Igor Babaev authored
    When adding a new record into the join buffer that is employed by
    BNLH join algorithm the writing procedure JOIN_CACHE::write_record_data 
    checks whether there is enough space for the record in the buffer.
    When doing this it must take into account a possible new key entry
    added to the buffer. It might happen, as it has been demonstrated by
    the bug test case, that there is enough remaining space in the buffer
    for the record, but not for the additional key entry for this record.
    In this case the key entry overwrites the end of the record that might
    cause a crash or wrong results.
    Fixed by taking into account a possible addition of new key entry when
    estimating the remaining free space in the buffer.
    ca862231
sql_select.h 84.3 KB