php-src/ext/pdo_mysql
Nikita Popov caa710037e Rewrite PDO result binding
Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allow get_col to return an arbitrary zval.
See UPGRADING.INTERNALS for a more detailed description of the
change.

This makes the result fetching simpler, more efficient and more
flexible. The general possibility already existed via the special
PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or
inefficient. Now it's possible to easily implement behavior like
"return int if it fits, otherwise string" and to avoid any kind
of complex management of temporary buffers.

This also fixes bug #40913 (our second highest voted bug of all
time, for some reason). PARAM_LOB result bindings will now
consistently return a stream resource, independently of the used
database driver.

I've tried my best to update all PDO drivers for this change, but
some of the changes may be broken, as I cannot test or even build
some of these drivers (in particular PDO dblib and PDO oci).
Fixes are appreciated -- a working CI setup would be even more
appreciated ;)
2020-12-22 15:56:34 +01:00
..
tests Rewrite PDO result binding 2020-12-22 15:56:34 +01:00
config.m4 Don't assume libmysqlclient library name 2020-11-12 15:11:56 +01:00
config.w32 Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
CREDITS Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
get_error_codes.php Apply tidy formatting 2020-02-03 13:41:31 +01:00
mysql_driver.c PDO MySQL: Use correct type when setting INT_AND_FLOAT_NATIVE 2020-12-17 18:50:24 +01:00
mysql_statement.c Rewrite PDO result binding 2020-12-22 15:56:34 +01:00
pdo_mysql.c Convert warning to assetion in MySQL PDO driver 2020-09-15 12:49:59 +02:00
php_pdo_mysql_int.h PDO MySQL: Use native types for results 2020-12-17 10:54:34 +01:00
php_pdo_mysql_sqlstate.h
php_pdo_mysql.h Remove mention of PHP major version in Copyright headers 2019-09-25 14:51:43 +02:00