| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Closes GH-6766
|
|
|
|
| |
Therefore correctly report failure in MINIT for the drivers which didn't.
|
|
|
|
| |
Closes GH-6617
|
| |
|
|
|
|
|
|
|
| |
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.
Of course, zend_bool is retained as an alias.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This macro hasn't made sense since PHP 7. The correct pattern to
use is ZVAL_DEREF + SEPARATE_ZVAL_NOREF.
|
| |
|
|
|
|
| |
Closes GH-6547
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This includes begin(), commit(), rollBack(), and inTransaction()
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ;)
|
|
|
|
|
| |
Of the important PDO drivers, this affects only PDO PgSQL, as
both MySQL and SQLite do not return native boolean types.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Rather than storing char* + size_t, use a zend_string*. Also
avoid various copies of the query string.
|
|\
| |
| |
| |
| | |
* PHP-8.0:
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.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Allow drivers to omit error code
|
| |
| |
| |
| |
| |
| |
| | |
And thus generate error messages that match what PDO emulation
would generate.
This fixes the error message regression from the previous commit.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
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.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Update ext/pdo_pgsql parameter names
|
| |
| |
| |
| | |
Closes GH-6329.
|
|/
|
|
|
|
|
|
|
| |
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 should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
|
|
|
| |
Closes GH-6159
|
|
|
|
| |
Closes GH-6119
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
| | |
| | |
| | | |
Closes GH-5958
|
| | |
| | |
| | |
| | | |
Closes GH-5917
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5758
|
| | |
| | |
| | |
| | |
| | |
| | | |
These are no longer needed after https://wiki.php.net/rfc/always_enable_json
Closes GH-5637
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Even if that header file is available, we better consider it private,
and don't include it. The information about whether SSL support is
enabled is now missing (`USE_(OPEN)SSL`), and it seems there is no
alternative way to get it (`PQinitSSL()` is always defined), so we
remove it from the PHP info. Furthermore, the `PG_VERSION` and
`PG_VERSION_STR` macros are no longer available, but as of libpq 9.1
there is `PQlibVersion()` which allows us to construct `PG_VERSION` in
a most likely backwards compatible manner. The additional information
available through `PG_VERSION_STR` is lost, though, so we define
`PGSQL_LIBPQ_VERSION_STR` basically as alias of `PGSQL_LIBPQ_VERSION`,
and deprecate it right away.
Since we are now requiring at least libpq 9.1, we can remove some
further compatibility code and additional checks.
Regarding the raised requirements: official support for PostGreSQL 9.0
ended on 2015-10-08, and even CentOS 7 already has PostGreSQL 9.2, so
this is not supposed to be too much of an issue.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79532: sizeof off_t can be wrong
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have to actually determine the proper `SIZEOF_OFF_T`.
Interestingly, it is `4` on Windows x64.
We also have to prevent the redefinition in pg_config.h. The clean
solution would likely be to not include pg_config.h at all, but that's
out of scope for BC reasons for now.
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
|
| | | |
|
| | | |
|