Indeed. There are several flaws in how mysql handles data. This is why to the best of my ability I am trying to avoid mysql, and use postgresql if whatever chunk of software I need is designed to work also with postgresql. And I recommend developers I work with/for the same (to use postgresql). These are good examples:
http://dev.mysql.com/doc/refman/5.1/en/sql-mode.html#sql-mode-strict