Loading mysql-test/r/olap.result +8 −0 Original line number Diff line number Diff line Loading @@ -726,3 +726,11 @@ count(a) 3 drop table t1; ############################################################## CREATE TABLE t1(a INT); INSERT INTO t1 VALUES(0); SELECT 1 FROM t1 GROUP BY (DATE(NULL)) WITH ROLLUP; 1 1 1 DROP TABLE t1; End of 5.0 tests mysql-test/t/olap.test +9 −0 Original line number Diff line number Diff line Loading @@ -367,3 +367,12 @@ select count(a) from t1 group by null with rollup; drop table t1; --echo ############################################################## # # Bug #32558: group by null-returning expression with rollup causes crash # CREATE TABLE t1(a INT); INSERT INTO t1 VALUES(0); SELECT 1 FROM t1 GROUP BY (DATE(NULL)) WITH ROLLUP; DROP TABLE t1; --echo End of 5.0 tests sql/item_func.h +1 −1 Original line number Diff line number Diff line Loading @@ -782,7 +782,7 @@ class Item_func_rollup_const :public Item_func max_length= args[0]->max_length; decimals=args[0]->decimals; /* The item could be a NULL constant. */ null_value= args[0]->null_value; null_value= args[0]->is_null(); } }; Loading Loading
mysql-test/r/olap.result +8 −0 Original line number Diff line number Diff line Loading @@ -726,3 +726,11 @@ count(a) 3 drop table t1; ############################################################## CREATE TABLE t1(a INT); INSERT INTO t1 VALUES(0); SELECT 1 FROM t1 GROUP BY (DATE(NULL)) WITH ROLLUP; 1 1 1 DROP TABLE t1; End of 5.0 tests
mysql-test/t/olap.test +9 −0 Original line number Diff line number Diff line Loading @@ -367,3 +367,12 @@ select count(a) from t1 group by null with rollup; drop table t1; --echo ############################################################## # # Bug #32558: group by null-returning expression with rollup causes crash # CREATE TABLE t1(a INT); INSERT INTO t1 VALUES(0); SELECT 1 FROM t1 GROUP BY (DATE(NULL)) WITH ROLLUP; DROP TABLE t1; --echo End of 5.0 tests
sql/item_func.h +1 −1 Original line number Diff line number Diff line Loading @@ -782,7 +782,7 @@ class Item_func_rollup_const :public Item_func max_length= args[0]->max_length; decimals=args[0]->decimals; /* The item could be a NULL constant. */ null_value= args[0]->null_value; null_value= args[0]->is_null(); } }; Loading