Hi,
I just wanted to know if there is a special reason for the
mathematically incorrect implementation of the modulo-operation in mysql.
Using a correct modulo operation on a negative number would still result
in a positive number:
-1 % 2 == 1 (mysql: -1)
-5 % 3 == 1 (mysql: -2)
-1 % 4 == 3 (mysql: -1)
(For the exact definition see
http://en.wikipedia.org/wiki/Modulo_operation )
AFAIK most programming languages implement modulo in this wrong way
(except pascal i think), but I don't have a clou why it should stay that
way as I find this behaviour rather disturbing...
Cheers,
Thomas