Bug #61681 Group by with rollup query not valid
Submitted: 28 Jun 2011 23:12 Modified: 28 Jun 2011 23:47
Reporter: Diogo Domanski Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.34 OS:Linux (Ubuntu 11.04)
Assigned to: CPU Architecture:Any

[28 Jun 2011 23:12] Diogo Domanski
Queries containing WITH ROLLUP modifier are not being accepted by SQL Editor - it causes an error and the query cannot be executed.

How to repeat:
1. Create a test table
    year    INT NOT NULL,
    country VARCHAR(20) NOT NULL,
    product VARCHAR(32) NOT NULL,
    profit  INT

2. Add some records (this step is not required)

3. Try to execute the following query
SELECT year, SUM(profit) FROM sales GROUP BY year WITH ROLLUP;

Suggested fix:
Add WITH ROLLUP syntax to query validation engine
[28 Jun 2011 23:47] Alfredo Kojima
Duplicate of bug #57178