1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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.
This commit is contained in:
Sergey Glukhov
2011-05-26 14:06:39 +04:00
parent 90df87e46c
commit aa0c8235a4
3 changed files with 15 additions and 0 deletions

View File

@@ -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