• gunnar@mysql.com.'s avatar
    item_func.cc: · 001224c0
    gunnar@mysql.com. authored
      fix for bug#8461
    
      BUG 8461 - TRUNCATE returns incorrect result if 2nd argument is negative
      Reason: Both TRUNCATE/ROUND converts INTEGERS to DOUBLE and back to INTEGERS
      Changed the integer routine to work on integers only.
      This bug affects 4.1, 5.0 and 5.1
      Fixing in 4.1 will need to change the routine to handle different types individually.
      5.0 did had different routines for different types already just the INTEGER routine was bad.
    001224c0
func_math.test 4.57 KB