• Sergei Petrunia's avatar
    MDEV-22866: Crash in join optimizer with constant outer join nest · 69727355
    Sergei Petrunia authored
    Starting from 10.3, the optimizer is able to detect that entire outer join
    nests are constants (because of "Impossible ON") and remove them (see
    mark_join_nest_as_const)
    
    However, this was not properly accounted for in NESTED_JOIN structure
    and the way check_interleaving_with_nj() uses its n_tables member to
    check if the join prefix order is allowed.
    
    (The result was that the optimizer could conclude that no join prefix is
    allowed and fail an assertion)
    69727355
join_outer.test 69.9 KB