• Varun Gupta's avatar
    MDEV-16579: Wrong result of query using DISTINCT COUNT(*) OVER (*) · 164cf4f4
    Varun Gupta authored
    The query requires 2 temporary tables for execution, the window function
    is always attached to the last temporary table, but in this case the
    result field of the window function points to the first temporary table
    rather than the last one.
    Fixed this by not changing window function items with temporary table
    items of the first temporary table.
    164cf4f4
sql_select.cc 873 KB