|
|||||||||||
|
bk commit into 5.0 tree (evgen:1.2539) BUG#31095
From: <eugene(at)mysql.com>
Date: Fri Sep 28 2007 - 20:22:57 EDT
ChangeSet@1.2539, 2007-09-29 00:22:54+00:00, evgen@moonbone.local +3 -0 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 the JOIN::rollup_init function when the object is used to wrap a NULL constant. mysql-test/r/olap.result@1.40, 2007-09-29 00:20:01+00:00, evgen@moonbone.local +11 -0 Added a test case for the bug#31095: Unexpected NULL constant caused server crash. mysql-test/t/olap.test@1.29, 2007-09-29 00:19:47+00:00, evgen@moonbone.local +9 -0 Added a test case for the bug#31095: Unexpected NULL constant caused server crash. sql/sql_select.cc@1.554, 2007-09-29 00:20:14+00:00, evgen@moonbone.local +2 -0 Bug#31095: Unexpected NULL constant caused server crash. Now the null_value of an object of the Item_func_rollup_const class is set by the JOIN::rollup_init function when the object is used to wrap a NULL constant. diff -Nrup a/mysql-test/r/olap.result b/mysql-test/r/olap.result --- a/mysql-test/r/olap.result 2007-05-30 06:55:36 +00:00 DROP TABLE t1; +# +# Bug#31095: Unexpected NULL value constant server crash. +# +create table t1(a int); +insert into t1 values (1),(2),(3); +select a,count(a) from t1 group by null with rollup; +a count(a) +1 3 +1 3 +drop table t1; +############################################################## diff -Nrup a/mysql-test/t/olap.test b/mysql-test/t/olap.test --- a/mysql-test/t/olap.test 2007-04-30 01:32:57 +00:00@@ -358,3 +358,12 @@ SELECT * FROM (SELECT a, SUM(a) FROM t1 DROP TABLE t1; +--echo # --- a/sql/sql_select.cc 2007-09-24 12:34:09 +00:00 -- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Fri Sep 28 16:28:13 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 09:44:39 EDT |
||||||||||
|
|||||||||||