• unknown's avatar
    Fix bug#12887 Distinct is not always applied after rollup · 36d163d6
    unknown authored
    For queries with GROUP BY and without hidden GROUP BY fields DISTINCT is
    optimized away becuase such queries produce result set without duplicates.
    But ROLLUP can add rows which may be same to some rows and this fact was
    ignored.
    
    Added check so if ROLLUP is present DISTINCT can't be optimized away.
    
    
    sql/sql_select.cc:
      Fix bug #12887 Distinct is not always applied after rollup
    mysql-test/r/olap.result:
      Test case for bug #12887 Distinct is not always applied after rollup
    mysql-test/t/olap.test:
      Test case for bug #12887 Distinct is not always applied after rollup
    36d163d6
olap.result 13.6 KB