mirror of
https://github.com/MariaDB/server.git
synced 2025-11-06 13:10:12 +03:00
returns incorrect result with large decimal value" For the DIV operator, neither operands nor result were checked for integer overflows. This patch changes the DIV behavior for non-integer operands as follows: if either of the operands has a non-integer type, convert both operands to the DECIMAL type, then calculate the division using DECIMAL arithmetics. Convert the resulting DECIMAL value into BIGINT [UNSIGNED] if it fits into the corresponding range, or throw an 'out of range' error otherwise.
10 KiB
10 KiB