1
0
mirror of https://github.com/MariaDB/server.git synced 2025-04-24 18:27:21 +03:00
Alexey Kopytov 39f9a3ffd0 Bug #48475: DISTINCT is ignored with GROUP BY WITH ROLLUP and
only const tables

The problem was caused by two shortcuts in the optimizer that
are inapplicable in the ROLLUP case.

Normally in a case when only const tables are involved in a
query, DISTINCT clause can be safely optimized away since there
may be only one row produced by the join. Similarly, we don't
need to create a temporary table to resolve DISTINCT/GROUP
BY/ORDER BY. Both of these are inapplicable when the WITH
ROLLUP modifier is present.

Fixed by disabling the said optimizations for the WITH ROLLUP
case.

mysql-test/r/olap.result:
  Added a test case for bug #48475.
mysql-test/t/olap.test:
  Added a test case for bug #48475.
sql/sql_select.cc:
  Disabled const-only table optimizations for the WITH ROLLUP
  case.
2009-11-06 09:44:01 +03:00
..
2008-12-17 15:01:34 -05:00
2008-07-14 16:16:37 -04:00
2008-07-10 14:47:53 -04:00
2007-11-05 20:18:22 +01:00
2008-12-12 14:59:10 +04:00
2009-09-24 16:21:46 +03:00
2009-11-03 19:58:54 +03:00
2009-02-06 18:25:08 +01:00
2009-04-01 16:02:26 +05:00
2009-09-17 14:25:07 +03:00
2009-03-19 09:44:58 -04:00
2009-11-03 19:58:54 +03:00
2008-07-10 14:50:07 -04:00
2009-09-30 18:38:02 -03:00
2008-01-23 13:26:41 -07:00
2009-10-27 15:02:58 +04:00
2009-11-03 19:58:54 +03:00
2007-07-01 15:33:28 -07:00
2009-03-19 09:44:58 -04:00
2008-09-16 13:16:41 +02:00
2009-11-03 19:58:54 +03:00
2009-08-21 17:10:55 +03:00
2009-06-29 15:17:01 +02:00