1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#31095: Unexpected NULL constant caused server crash.

The Item_func_rollup_const class is used for wrapping constants to avoid
wrong result for ROLLUP queries with DISTINCT and a constant in the select
list. This class is also used to wrap up a NULL constant but its null_value
wasn't set accordingly. This led to a server crash.

Now the null_value of an object of the Item_func_rollup_const class is set
by its fix_length_and_dec member function.
This commit is contained in:
evgen@moonbone.local
2007-10-01 20:03:50 +00:00
parent 2a26db1ffd
commit 49af76ac8a
3 changed files with 22 additions and 0 deletions

View File

@@ -715,3 +715,14 @@ a SUM(a)
4 4
NULL 14
DROP TABLE t1;
#
# Bug#31095: Unexpected NULL constant caused server crash.
#
create table t1(a int);
insert into t1 values (1),(2),(3);
select count(a) from t1 group by null with rollup;
count(a)
3
3
drop table t1;
##############################################################