Mysql type hidden type casting
===

I am trying to improve an old system (written ages ago) where every mysql queries are glued from string. So example of that query looks like

    "SELECT * FROM User WHERE id > '3'"

Id column is of course bigint and PK.


What does mysql do with '3' in query where id should be a int value? I assume it is treated as a string (due to '') so this value is casted into int during analyze/optimize process by mysql. Am I right? 
