History log of /PHP-8.2/ext/pdo/pdo_stmt.c (Results 26 – 50 of 513)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 7aa00369 07-Jan-2021 Nikita Popov

Switch bound_param_map to zend_string


# 01c8fe8f 23-Dec-2020 George Peter Banyard

Convert strcmp() usage to zend_string_equals_literal()


# caa71003 17-Dec-2020 Nikita Popov

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, allo

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 ;)

show more ...


# 737195c3 21-Dec-2020 Nikita Popov

PDO: Honor ATTR_STRINGIFY_FETCHES for booleans

Of the important PDO drivers, this affects only PDO PgSQL, as
both MySQL and SQLite do not return native boolean types.


# c7cccc1c 18-Dec-2020 Nikita Popov

Fix leak


# 7904a087 18-Dec-2020 Nikita Popov

Back memory stream by a zend_string

This allows reusing an existing zend_string inside a memory stream
without reallocating. For non-readonly streams, the string will
only get separa

Back memory stream by a zend_string

This allows reusing an existing zend_string inside a memory stream
without reallocating. For non-readonly streams, the string will
only get separated on write.

show more ...


# 205d209d 16-Dec-2020 Nikita Popov

PDO MySQL: Use mysqlnd column names

mysqlnd already creates interned zend_strings for us, so let's
make use of them.

This also required updating the PDO case changing code to wo

PDO MySQL: Use mysqlnd column names

mysqlnd already creates interned zend_strings for us, so let's
make use of them.

This also required updating the PDO case changing code to work
with potentially shared strings. For the lowercasing, use the
optimized zend_string_tolower() implementation.

show more ...


# cfe2b36a 15-Dec-2020 Nikita Popov

Fix ATTR_ORACLE_NULLS with PARAM_ZVAL

PARAM_ZVAL with a STR result should be treated the same way as
PARAM_STR in this regard.


# 2d51c203 11-Dec-2020 Nikita Popov

PDO: Store/pass query_string as zend_string

Rather than storing char* + size_t, use a zend_string*. Also
avoid various copies of the query string.


# 9e3ba775 10-Dec-2020 Nikita Popov

Fixed bug #72368

Generate a param count mismatch error even if the query contains
no placeholders.

Additionally we shouldn't HANDLE errors from pdo_parse_params,
which are a

Fixed bug #72368

Generate a param count mismatch error even if the query contains
no placeholders.

Additionally we shouldn't HANDLE errors from pdo_parse_params,
which are always reported via raise_impl_error. Doing so results
in duplicate error messages.

show more ...


# 15b51a21 10-Dec-2020 Nikita Popov

Fixed bug #79131

When a driver reports an error during EVT_ALLOC (and some over EVTs),
make sure we handle it as usual, i.e. warn or throw.

This requires some adjustments in PDO

Fixed bug #79131

When a driver reports an error during EVT_ALLOC (and some over EVTs),
make sure we handle it as usual, i.e. warn or throw.

This requires some adjustments in PDO PgSQL to stop manually doing
this through an impl error.

Unfortunately the PDO PgSQL error messages regress because of this,
as they now include a completely arbitrary error code. There doesn't
seem to be an ability to skip it right now.

show more ...


# bfa69d27 08-Dec-2020 Nikita Popov

Handle column count change in PDO MySQL

This has been fixed for PDO SQlite by GH-4313, however the same
issue also applied to PDO MySQL.

Move the column count setting function i

Handle column count change in PDO MySQL

This has been fixed for PDO SQlite by GH-4313, however the same
issue also applied to PDO MySQL.

Move the column count setting function into the main PDO layer
(and export it) and then use it in both PDO SQLite and PDO MySQL.

show more ...


# 74fe9170 19-Oct-2020 Nikita Popov

Check PDOStatement initialization during iteration


# 7553c696 28-Sep-2020 George Peter Banyard

Another pass making some failure states unconditional erros in PDO

Also make internal function return type more accurate to inform usage


# a5cf8280 24-Sep-2020 George Peter Banyard

Make various failure conditions in PDO unconditional errors

This includes TypeErrors, ValueErrors, Error for uninitialized objects
and invalid user classes/callable instanciation

Make various failure conditions in PDO unconditional errors

This includes TypeErrors, ValueErrors, Error for uninitialized objects
and invalid user classes/callable instanciation

Closes GH-6212

show more ...


# 4dfbf076 25-Sep-2020 George Peter Banyard

Fix logic error in PDO


# 0cc72679 25-Sep-2020 George Peter Banyard

Inverse logic in do_fetch() to reduce a level of indentation


# 41161089 25-Sep-2020 George Peter Banyard

Drop do_bind argument in do_fetch(_common)() in PDO

It is always set to true by callers and therefore irrelevant.


# 5bb41fa6 21-Sep-2020 Nikita Popov

Promote PDORow property write to Error


# 6f76817f 21-Sep-2020 Nikita Popov

Remove dead code

The "if ever" here is the relevant bit...


# 44ade0e8 31-Aug-2020 Matteo Beccati

Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters

Added new flags that allow skipping param_evt(s) that are not used by drivers,
in a backwards and

Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters

Added new flags that allow skipping param_evt(s) that are not used by drivers,
in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite
and oci drivers to properly use the new flags. I've left out pdo_dblib, which
doesn't have a param_hook, and pdo_firebird, which seems to be using
PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).

show more ...


# ee2506cc 31-Aug-2020 Matteo Beccati

Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters

Added new flags that allow skipping param_evt(s) that are not used by drivers,
in a backwards and

Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters

Added new flags that allow skipping param_evt(s) that are not used by drivers,
in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite
and oci drivers to properly use the new flags. I've left out pdo_dblib, which
doesn't have a param_hook, and pdo_firebird, which seems to be using
PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).

show more ...


# 670036e2 13-Aug-2020 Nikita Popov

Use Z_PARAM_CLASS in PDOStatement::fetchObject()

Instead of implementing custom logic.


# 2803c8fb 07-Aug-2020 Máté Kocsis

Add all the missing parameter types to stubs

Closes GH-5955


# 8b77c581 07-Aug-2020 Nikita Popov

Accept zend_object* in zend_update_property


12345678910>>...21