• Igor Babaev's avatar
    MDEV-10466 Server crashed in SEL_ARG::store_min() with extended_keys=on · 407b0a6a
    Igor Babaev authored
    This bug could manifest itself in a very rare cases when the optimizer
    chose an execution plan by which a joined table was accessed by a table
    scan and the optimizer was checking whether ranges checked for each record
    could improve this plan. In such cases the optimizer evaluates range
    conditions over a table that depend on other tables. For such conditions
    the constructed SEL_ARG trees are marked as MAYBE_KEY. If a SEL_ARG object
    constructed for a sargable condition marked as RANGE_KEY had the same
    first key part as a MAYBE_KEY SEL_ARG object and the key_and() function
    was called for this pair of SEL_ARG objects then an invalid SEL_ARG
    object could be constructed that ultimately could lead to a crash before
    the execution phase.
    407b0a6a
range_innodb.result 1.97 KB