Bug #68564 | ROLLUP-NULL sometimes becomes other than NULL | ||
---|---|---|---|
Submitted: | 4 Mar 2013 21:17 | Modified: | 6 Mar 2013 12:35 |
Reporter: | Programmer Old | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 5.5.8-log | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[4 Mar 2013 21:17]
Programmer Old
[6 Mar 2013 12:35]
Jørgen Løland
Thank you for the bug report. Verified as described.
[14 Nov 2015 1:25]
Zhe Dong
I got the same bug. Can be repeated this way: CREATE TABLE t (a INT, b INT, c INT); INSERT INTO t VALUES (1,0,0),(1,0,1),(1,1,0),(1,1,1); SELECT c,c FROM t GROUP BY b,c WITH ROLLUP; I plan to implement CUBE feature and might also fix this bug in the same time.
[10 Feb 2016 16:45]
Dan Boresjö
I ran into this using rollup with a view as follows: drop table bug_test; create table bug_test ( a int, b char, c char ); insert into bug_test values (1, 'A', 'B'); insert into bug_test values (2, 'A', 'C'); insert into bug_test values (3, null, null); create or replace view bug_test_view as select a as u, coalesce(b, 'bob') as w, c as v from bug_test; select u as a, w as b, count(*) from bug_test_view group by u, w with rollup