| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Relates GH-6742
|
| |
|
|
|
|
| |
Closes GH-6610.
|
|
|
|
| |
Closes GH-6617
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Historically, the _ex variants separated the zval first, if a
conversion was necessary. This distinction no longer makes sense
since PHP 7.
The only difference that was still left is that _ex checked whether
the type is the same first, but the usage of these macros did not
actually distinguish on whether such an inlined check is valuable
or not in a given context.
Also drop the unused convert_to_explicit_type macros.
|
|
|
|
| |
Closes GH-6547
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This includes begin(), commit(), rollBack(), and inTransaction()
|
|
|
|
|
|
|
| |
Return integers and floats as native types if possible. As usual,
the old behavior can be restored by enabling ATTR_STRINGIFY_FETCHES.
Fixes bug #38334.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ;)
|
|
|
|
|
| |
Rather than storing char* + size_t, use a zend_string*. Also
avoid various copies of the query string.
|
|\
| |
| |
| |
| | |
* PHP-8.0:
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.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Closes GH-6310
|
|/
|
|
|
|
|
|
|
| |
Add a get_gc method that can be implemented by drivers, which can
be used to add additional zvals to the GC buffer.
Implement GC support for PDO SQLite callbacks in particular.
Closes GH-6262.
|
|
|
|
|
|
|
| |
This includes TypeErrors, ValueErrors, Error for uninitialized objects
and invalid user classes/callable instanciation
Closes GH-6212
|
|
|
|
|
| |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
PDO::__construct() fails
PDO driver constructors are throwing PdoException without setting
errorInfo, so create a new reusable function that throws exceptions
for PDO and will also set the errorInfo. Use this function in
pdo_mysql, pdo_sqlite, and pdo_pgsql.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Per docs it should be -1. And would be on 32-bit systems, but
not on 64-bit systems.
(cherry picked from commit 39111585a2f8e40e72bdc662eb8b2e3c19e93615)
|
| | |
| | |
| | |
| | | |
Closes GH-5958
|
| | |
| | |
| | |
| | | |
Closes GH-5917
|
| | | |
|
| | |
| | |
| | |
| | | |
Putting these under a dummy PDO_SQLite_Ext class.
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5590
|
| | |
| | |
| | |
| | | |
Closes GH-5758
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Report len as -1 instead of INT_MAX
|
| | |
| | |
| | |
| | |
| | | |
Per docs it should be -1. And would be on 32-bit systems, but
not on 64-bit systems.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79664: PDOStatement::getColumnMeta fails on empty result set
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79664: PDOStatement::getColumnMeta fails on empty result set
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As its name suggests, `sqlite3_data_count` returns the number of
columns in the current row of the result set; we are interested in the
number of columns regardless of the current row, so we have to use
`sqlite3_column_count` instead.
|
| | |
| | |
| | |
| | | |
According to <https://www.php.net/manual/en/pdo.error-handling.php>.
|
| | |
| | |
| | |
| | | |
Closes GH-5312
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Apply tidy formatting
|
| | |
| | |
| | |
| | | |
Mostly reindent PHP scripts to spaces.
|
| | |
| | |
| | |
| | | |
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #79056
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
As ZPP now throws, it makes no sense to specify an explicit return
value.
|