Issue Bug Closed

#88272Different return types between mysqli and pdo_mysql driver

Patrick Broens 05/04/19, 15:08 updated 12/23/19, 22:49

Description

The mysqli driver is returning most types as they are in the database, so integers are returned as integers, the pdo_mysql driver casts everything to strings. This makes switching to a different driver a hell of a job, expecially coming from mysqli and going to pdo_mysql. When developing with mysqli, you get properly casted values back from Doctrine, so as a developer you won’t cast them anymore to a specific type, when the type is already what it needs to be. Especially extension can break easily when developed on mysqli, but executed on a system with pdo_mysql.

It would be good to get the same behaviour from both drivers, both returning the types as they are in the database, so integers returned as integers.

Reviews 2