@ArielGlenn pointed out that the database always returns strings, even when the field type is an integer. This has always been the case. However, I think it's trivially fixable, and would be relatively harmless. There will be a little bit of CPU overhead, and many tests will need to be updated.
The underlying C API mysql_fetch_row() is stringly typed, and both mysqli and the old mysql extensions just return the strings. But mysqli can provide type information for returned fields, so you can use that to conditionally cast them.