• Galina Shalygina's avatar
    MDEV-16386: Wrong result when pushdown into the HAVING clause of the · ec4fdd57
    Galina Shalygina authored
                materialized derived table/view that uses aliases is done
    
    The problem appears when a column alias inside the materialized derived
    table/view t1 definition coincides with the column name used in the
    GROUP BY clause of t1. If the condition that can be pushed into t1
    uses that ambiguous column name this column is determined as a column that
    is used in the GROUP BY clause instead of the alias used in the projection
    list of t1. That causes wrong result.
    To prevent it resolve_ref_in_select_and_group() was changed.
    ec4fdd57
item.cc 294 KB