diff options
author | unknown <evgen@moonbone.local> | 2007-10-01 20:03:50 +0000 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2007-10-01 20:03:50 +0000 |
commit | 1a4df8a24dff9411484717f7a41314d85f8b3425 (patch) | |
tree | 3c4a4aa0e3f4fa2b03ba29f3884b7b21184c62ac /sql/item_func.h | |
parent | 464a9255abcacacc83b0e17976ddb12ed84a4afe (diff) | |
download | mariadb-git-1a4df8a24dff9411484717f7a41314d85f8b3425.tar.gz |
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.
mysql-test/t/olap.test:
Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
mysql-test/r/olap.result:
Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
sql/item_func.h:
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 its fix_length_and_dec member function.
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 57e33daf0c4..87c9e016df2 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -749,6 +749,8 @@ public: collation= args[0]->collation; max_length= args[0]->max_length; decimals=args[0]->decimals; + /* The item could be a NULL constant. */ + null_value= args[0]->null_value; } }; |