• Sergei Petrunia's avatar
    MDEV-24925: Server crashes in Item_subselect::init_expr_cache_tracker · c72c77ca
    Sergei Petrunia authored
    (trivial backport to 10.2)
    The optimizer removes redundant GROUP BY operations. If GROUP BY element
    is a subselect, it is "eliminated".
    
    However one must not eliminate the item if it is used both in the select
    list and in the GROUP BY, like so:
    
      select (select ... ) as SUBQ from ... group by SUBQ
    
    Do not eliminate such items.
    c72c77ca
subselect4.result 106 KB