The following expressions don't have the expected result (do not ignore the spaces):
I would expect that the results are both 1. I would expect that the calculation does not depend on existance of spaces between ! and !.
Changing sql_mode does not change behaviour (HIGH_NOT_PRECEDENCE).
On a MySQL 4.1 server the result of that query is all 1.