Commit 50f5ba45 authored by unknown's avatar unknown

Merge mysql.com:/home/ram/work/mysql-5.0-engines

into  mysql.com:/home/ram/work/b32558/b32558.5.0

parents 93e0508e 0c2dac2a
...@@ -726,3 +726,11 @@ count(a) ...@@ -726,3 +726,11 @@ count(a)
3 3
drop table t1; 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
...@@ -367,3 +367,12 @@ select count(a) from t1 group by null with rollup; ...@@ -367,3 +367,12 @@ select count(a) from t1 group by null with rollup;
drop table t1; drop table t1;
--echo ############################################################## --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
...@@ -782,7 +782,7 @@ public: ...@@ -782,7 +782,7 @@ public:
max_length= args[0]->max_length; max_length= args[0]->max_length;
decimals=args[0]->decimals; decimals=args[0]->decimals;
/* The item could be a NULL constant. */ /* The item could be a NULL constant. */
null_value= args[0]->null_value; null_value= args[0]->is_null();
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment