• unknown's avatar
    Bug#31095: Unexpected NULL constant caused server crash. · 1a4df8a2
    unknown authored
    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.
    1a4df8a2
olap.result 17.3 KB