Issues with MySQL driver coercing types