From aa0c8235a4fed513982cf3f576184404cf357826 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Thu, 26 May 2011 14:06:39 +0400 Subject: Bug#12392636 ASSERTION FAILED: SCALE >= 0 && PRECISION > 0 && SCALE <= PRECISION Assertion happens due to missing NULL value check in Item_func_round::fix_length_and_dec() function. The fix: added NULL value check for second parameter. --- mysql-test/r/func_math.result | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/r/func_math.result') diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index b9118feab1a..4e3608240d4 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -540,4 +540,10 @@ ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a')) -4939092.0000 Warnings: Warning 1292 Truncated incorrect DOUBLE value: 'a' +# +# Bug#12392636 ASSERTION FAILED: SCALE >= 0 && PRECISION > 0 && SCALE <= PRECISION +# +SELECT SUM(DISTINCT (TRUNCATE((.1), NULL))); +SUM(DISTINCT (TRUNCATE((.1), NULL))) +NULL End of 5.1 tests -- cgit v1.2.1