From 050c6723e81bc443d708e1a02730ed971d5c9be6 Mon Sep 17 00:00:00 2001 From: "kaa@polly.local" <> Date: Sat, 28 Apr 2007 20:01:01 +0400 Subject: Fix for bug #24912 "problems with bigint in abs() ceiling() round() truncate() mod()" and a number of related problems: - unsigned flag was not handled correctly for a number of mathematical funcions, which led to incorrect results - passing large values as the number of decimals to ROUND() resulted in incorrect results and even server crashes in some cases - reverted the fix and the testcase for bug #10083 as it violates the manual - fixed some testcases which relied on broken ROUND() behavior --- sql/item_strfunc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/item_strfunc.cc') diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 6b1921e5bc8..2bf196e9989 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1918,7 +1918,7 @@ String *Item_func_format::val_str(String *str) double nr= args[0]->val_real(); if ((null_value=args[0]->null_value)) return 0; /* purecov: inspected */ - nr= my_double_round(nr, decimals, FALSE); + nr= my_double_round(nr, (longlong) decimals, FALSE, FALSE); /* Here default_charset() is right as this is not an automatic conversion */ str->set(nr,decimals, default_charset()); if (isnan(nr)) -- cgit v1.2.1