|
If you use the round function within an if or case construct, the number of digits may not be correct.
Statement: select if(true, round(1.190000, 2), round(1.00000, 6));
Expected result: 1.19
Actual result: 1.190000
Workaround: Move the round outside.
Statement: select round(if(true, 1.190000, 1.000000), if(true, 2, 6));
Expected result: 1.19
Actual result: 1.19
The bug came from version 5.5.32 to version 5.5.33 and from version 10.0.4 to version 10.0.5.
The 10.1, 10.2, 10.3 and 10.4 branches are affected in all versions.
|