• Sergey Glukhov's avatar
    Bug#45152 crash with round() function on longtext column in a derived table · 33734e95
    Sergey Glukhov authored
    The crash happens due to wrong max_length value which is set on
    Item_func_round::fix_length_and_dec() stage. The value is set to
    args[0]->max_length which is too big in case of LONGTEXT(LONGBLOB) fields.
    The fix is to set max_length using float_length() function.
    
    
    
    mysql-test/r/func_math.result:
      test result
    mysql-test/t/func_math.test:
      test case
    sql/item_func.cc:
      The crash happens due to wrong max_length value which is set on
      Item_func_round::fix_length_and_dec() stage. The value is set to
      args[0]->max_length which is too big in case of LONGTEXT(LONGBLOB) fields.
      The fix is to set max_length using float_length() function.
    33734e95
func_math.result 15.5 KB