This one made me scratch my head for quite some time - turned out to be
a bug in the round()-function. It occurs only when there is only one
decimal to be "removed" by round(), and that decimal is 5. In this case
the function returns 0 when the correct answer is 1.
mysql> select round(0.5, 0 ) ;
+------------------+
| round(0.5, 0 ) |
+------------------+
| 0 | <====
+------------------+
1 row in set (0.00 sec)
"select round(0.05, 1 )" and "select round(0.005, 2 )" etc. produces the
same result.
dagS