• Sergey Glukhov's avatar
    Bug#57477 SIGFPE when dividing a huge number a negative number · c7371c9e
    Sergey Glukhov authored
    The problem is dividing by const value when
    the result is out of supported range.
    The fix:
    -return LONGLONG_MIN if the result is out of supported range for DIV operator.
    -return 0 if divisor is -1 for MOD operator.
    
    
    mysql-test/r/func_math.result:
      test case
    mysql-test/t/func_math.test:
      test case
    sql/item_func.cc:
      -return LONGLONG_MIN if the result is out of supported range for DIV operator.
      -return 0 if divisor is -1 for MOD operator.
    c7371c9e
func_math.result 18 KB