• Igor Babaev's avatar
    Fixed bug #52394 / LP bug #623209. · f4503f39
    Igor Babaev authored
    When an incremental join cache is used to join a table whose
    fields are not referenced anywhere in the query the association
    pointer to the last record in the such cache can be the same
    as the pointer to the end of the buffer. 
    The function JOIN_CACHE_BKA::get_next_key must take into 
    consideration this when iterating over the keys of the records
    from the join buffer. 
    The assertion in JOIN_TAB_SCAN_MRR::next also must take this
    into consideration.
    Borrowed a slightly changed test case from a patch attached to the
    bug #52394.
    f4503f39
sql_join_cache.cc 125 KB