Ahhhh, I got bitten by this last week and couldn’t for the life of me figure out what was going on!! I fixed it in the same way you described, but didn’t know why it worked :).
If you ask me, that’s really weird default behaviour on the part of mysql.
-Jonathan.