Closed malwaregarry closed 2 weeks ago
8.0.26-v1.2.453-d7c9a83f6b(rust-1.77.0-nightly-2024-05-06T12:12:40.122758622Z)
There seem to be a problem with the implicit inference / casting of decimals during comparison operations.
For example,
SELECT (0.12)>(-123456.1);
returns
ERROR 1105 (HY000): BadArguments. Code: 1006, Text = error: --> SQL:1:16 | 1 | SELECT (0.12)>(-123456.1) | ^ Decimal overflow at line : 723 while evaluating function `to_decimal(7, 2)(-123456.1)`
The bug discovered using SQLancer
-- errors SELECT (0.123)>(-1.1); SELECT (0.1234)>(-1.1); SELECT (0.1234)>(-12.1); SELECT (0.1234)>(-123.1);
-- no errors SELECT (0.12)>(1.1); SELECT (0.1)>(-1.1); SELECT (0.12)>(-1.12); SELECT (0.12)>(-1);
Search before asking
Version
8.0.26-v1.2.453-d7c9a83f6b(rust-1.77.0-nightly-2024-05-06T12:12:40.122758622Z)
What's Wrong?
There seem to be a problem with the implicit inference / casting of decimals during comparison operations.
For example,
returns
The bug discovered using SQLancer
How to Reproduce?
Are you willing to submit PR?