Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
-
10.2.1-5
Description
This script:
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a INT); |
INSERT INTO t1 VALUES (10),(20),(30); |
SELECT a,GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP; |
correctly returns
+------+----------------------------+
|
| a | GROUP_CONCAT(a ORDER BY a) |
|
+------+----------------------------+
|
| 10 | 10 |
|
| 20 | 20 |
|
| 30 | 30 |
|
| NULL | 10,20,30 |
|
+------+----------------------------+
|
These queries return an error:
SELECT a,GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP HAVING GROUP_CONCAT(a ORDER BY a)='10,20,30'; |
SELECT * FROM (SELECT a,GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP HAVING GROUP_CONCAT(a ORDER BY a)='10,20,30') t1; |
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP HAVING GROUP_CONCAT(a ORDER BY a)='10,20,30'); |
ERROR 1221 (HY000): Incorrect usage of CUBE/ROLLUP and ORDER BY
|
Attachments
Issue Links
- blocks
-
MDEV-8909 union parser cleanup
- Closed