• unknown's avatar
    Fix for bug #32558: group by null-returning expression with rollup causes crash · 0c2dac2a
    unknown authored
    Problem: setting Item_func_rollup_const::null_value property to argument's null_value
    before (without) the argument evaluation may result in a crash due to wrong null_value.
    
    Fix: use is_null() to set Item_func_rollup_const::null_value instead as it evaluates
    the argument if necessary and returns a proper value.
    
    
    mysql-test/r/olap.result:
      Fix for bug #32558: group by null-returning expression with rollup causes crash
        - test result.
    mysql-test/t/olap.test:
      Fix for bug #32558: group by null-returning expression with rollup causes crash
        - test case.
    sql/item_func.h:
      Fix for bug #32558: group by null-returning expression with rollup causes crash
        - use args[0]->is_null() to obtain Item_func_rollup_const::null_value 
          instead of args[0]->null_value as it's not set in advance in case of 
          constant functions.
    0c2dac2a
item_func.h 42.4 KB