• Igor Babaev's avatar
    MDEV-19255 Server crash in st_join_table::save_explain_data or assertion · a65d3b2c
    Igor Babaev authored
               `sel->quick' failure in JOIN::make_range_rowid_filters upon query
               with rowid_filter=ON
    
    Index ranges can be defined using conditions with inexpensive subqueries.
    Such a subquery is evaluated when some representation of a possible range
    sequence is built. After the evaluation the JOIN structure of the subsquery is distroyed.
    Any attempt to build the above representation may fail because the
    function that checks whether a subquery is inexpensive in some cases uses
    the join structure of the subquery.
    When a range rowid filter is built by a range sequence constructed out of
    a range condition that uses an inexpensive subquery the representation of
    the the sequence is built twice. Building the second representation fails
    due to the described problem with the execution of Item_subselect::is_expensive().
    The function was corrected to return the result of the last its invocation
    if the Item_subselect object has been already evaluated.
    a65d3b2c
item_subselect.cc 195 KB