Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 11.0(EOL), 11.1(EOL), 11.2(EOL)
-
None
-
None
Description
Testcase (run MTR test with --cursor-protocol):
CREATE TABLE `example1463` ( |
`Customer` varchar(255) NOT NULL, |
`DeliveryStatus` varchar(255) NOT NULL, |
`OrderSize` int(11) NOT NULL |
);
|
INSERT INTO example1463 VALUES ('Charlie', 'Success', 100); |
INSERT INTO example1463 VALUES ('David', 'Success', 110); |
INSERT INTO example1463 VALUES ('Charlie', 'Failed', 200); |
INSERT INTO example1463 VALUES ('David', 'Success', 100); |
INSERT INTO example1463 VALUES ('David', 'Unknown', 100); |
INSERT INTO example1463 VALUES ('Edward', 'Success', 150); |
INSERT INTO example1463 VALUES ('Edward', 'Pending', 150); |
|
SELECT Customer, Success, SUM(OrderSize) |
FROM (SELECT Customer, |
CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success, |
OrderSize
|
FROM example1463) as subQ |
GROUP BY Success, Customer |
WITH ROLLUP; |
|
DROP TABLE example1463; |
Expected result:
Customer Success SUM(OrderSize) |
Charlie No 200 |
David No 100 |
Edward No 150 |
NULL No 450 |
Charlie Yes 100
|
David Yes 210
|
Edward Yes 150
|
NULL Yes 460 |
NULL NULL 910 |
Actual result:
Customer Success SUM(OrderSize) |
Charlie No 200 |
David No 100 |
Edward No 150 |
No 450 |
Charlie Yes 100
|
David Yes 210
|
Edward Yes 150
|
Yes 460
|
910
|
Attachments
Issue Links
- relates to
-
MDEV-31005 Make working ./mtr --cursor-protocol
- Stalled