You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mysql version 10.3.22-MariaDB-1:10.3.22+maria~bionic-log
Steps required to reproduce the problem (take from the unit tests)
CREATE TABLE test (test DECIMAL(20,10));
INSERT INTO test VALUES(-42000.123456);
Expected Result.
'-42000.123456'
Actual Result.
'-42000.1234560000'
Why this is a problem
Mathematically speaking, both results are valid. However decimals are represented using strings in the lib (bcmath). Hence, when tested for equality, '-42000.123456' is not the same as '-42000.1234560000'. Greater/Lower comparison do work, but not strict equality. The unit tests enforce the presence of these trailing zeroes, which to me should not be.
I can do a pull request to fix this if you agree with me that this is an issue. Not a big one, but still :)
The text was updated successfully, but these errors were encountered:
CREATE TABLE test (test DECIMAL(20,10));
INSERT INTO test VALUES(-42000.123456);
'-42000.123456'
'-42000.1234560000'
Mathematically speaking, both results are valid. However decimals are represented using strings in the lib (bcmath). Hence, when tested for equality, '-42000.123456' is not the same as '-42000.1234560000'. Greater/Lower comparison do work, but not strict equality. The unit tests enforce the presence of these trailing zeroes, which to me should not be.
I can do a pull request to fix this if you agree with me that this is an issue. Not a big one, but still :)
The text was updated successfully, but these errors were encountered: