• Igor Babaev's avatar
    Fixed LP bug#672497. · 12bd888c
    Igor Babaev authored
    Miscalculation of the minimum possible buffer size could trigger
    an assert in JOIN_CACHE_HASHED::put_record when if join_buffer_size
    was set to the values that is less than the length of one record to
    stored in the join buffer.
    It happened due to the following mistakes:
    - underestimation of space needed for a key in the hash table
      (we have to take into account that hash table can have more
      buckets than the expected number of records).
    - the value of maximum total length of all records stored in
      the join buffer was not saved in the field max_used_fieldlength
      by the function calc_used_field_length.
    12bd888c
sql_join_cache.cc 130 KB