#
5941cdaa |
| 13-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix ZTS crashes with persistent resources in modules (#13381) On shutdown in ZTS the following happens: - https://github.com/php/php-src/blob/master/Zend/zend.c#L1124-L1125 gets ex
Fix ZTS crashes with persistent resources in modules (#13381) On shutdown in ZTS the following happens: - https://github.com/php/php-src/blob/master/Zend/zend.c#L1124-L1125 gets executed. This destroys global persistent resources and destroys the modules. Furthermore, the modules are unloaded too. - Further down, `ts_free_id(executor_globals_id)` gets executed, which calls `executor_globals_dtor`. This function destroys persistent resources for each thread. Notice that in the last step, the modules that the persistent resource belong to may already have been destroyed. This means that accessing globals will cause a crash (I previously fixed this with ifdef magic), or when the module is dynamically loaded we'll try jumping to a destructor that is no longer loaded in memory. These scenarios cause crashes. It's not possible to move the `ts_free_id` call upwards, because that may break assumptions of callers, and furthermore this would deallocate the executor globals structure, which means that any access to those will cause a segfault. This patch adds a new API to the TSRM that allows running a callback on a certain resource type. We use this API to destroy the persistent resources in all threads prior to the module destruction, and keep the rest of the resource dtor intact. I verified this fix on Apache with postgres, both dynamically and statically. Fixes GH-12974.
show more ...
|
#
452e008f |
| 08-Feb-2024 |
George Barbarosie |
Fix GH-13354: ext/pgsql: pg_execute, pg_send_query_params and_send_execute null value by reference. For these, when passing null values by refence, queries return erroneous values unlike
Fix GH-13354: ext/pgsql: pg_execute, pg_send_query_params and_send_execute null value by reference. For these, when passing null values by refence, queries return erroneous values unlike pg_query_params behaving as expected. close GH-13355.
show more ...
|
#
d6a0b3af |
| 11-Jan-2024 |
Máté Kocsis |
Implement PDO driver-specific subclasses RFC: https://wiki.php.net/rfc/pdo_driver_specific_subclasses Closes GH-12804 Co-Authored-By: Danack <Danack@basereality.com>
|
#
77ac1e85 |
| 26-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-12974: Apache crashes on shutdown when using pg_pconnect() On ZTS, the global variables are stored in dynamically allocated memory. When the module gets shut down this memory is r
Fix GH-12974: Apache crashes on shutdown when using pg_pconnect() On ZTS, the global variables are stored in dynamically allocated memory. When the module gets shut down this memory is released. After the module is shut down, only then are the persistent resources cleared. Normally this isn't an issue, but pgsql and odbc refer to the globals to modify some counters, after the globals have been freed. Fix this by guarding the modification. Closes GH-13032.
show more ...
|
#
d98a45d0 |
| 19-Dec-2023 |
David Carlier |
ext/pgsql: pgsql.allow_persistent, no need to use such large type for boolean state. also ext/odbc, simplifying odd comparison with non persistent connections. Close GH-12976
|
#
beaf1e81 |
| 19-Nov-2023 |
Máté Kocsis |
Deprecate calling pg_fetch_result(), pg_field_prtlen(), and pg_field_is_null() with 2 arguments
|
#
3f57bd80 |
| 24-Nov-2023 |
ddv |
Fix phpGH-12763: PGSQL pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given.
|
#
1e66e6ae |
| 20-Nov-2023 |
Jakub Zelenka |
Revert incomplete PG pipeline addition Closes GH-12735
|
#
63898008 |
| 10-Nov-2023 |
Dmitriy Degtyaryov |
Fix GH-9344: pgsql pipeline mode proposal. Adding pg_send_flush_request. Fix freeze after next execute pg_send_* on PQgetResult in _php_pgsql_link_has_results. Set nonblocking for pi
Fix GH-9344: pgsql pipeline mode proposal. Adding pg_send_flush_request. Fix freeze after next execute pg_send_* on PQgetResult in _php_pgsql_link_has_results. Set nonblocking for pipelining mode. No flush client buffer in pg_send_* for pipelining mode. Close GH-12644
show more ...
|
#
045dc10b |
| 18-Oct-2023 |
David CARLIER |
ext/pgsql: cleanup the 3rd protocol is supported since circa 2010. (#12465)
|
#
75da0d7c |
| 08-Oct-2023 |
Omar Emara |
PGSQL: Allow unconditional selection in pg_select Previously, pg_select did not allow unconditional selection, where an empty ids array would result in a function failure. This
PGSQL: Allow unconditional selection in pg_select Previously, pg_select did not allow unconditional selection, where an empty ids array would result in a function failure. This patch implements two changes: - Make the ids array an optional parameter. - Allow the ids array to be empty. In both cases, unconditional selection happen, which is equivalent to pg_query('SELECT * FROM <table>;'). Two test cases were added to test the aforementioned changes. Close GH-5332
show more ...
|
#
692cea5c |
| 13-Sep-2023 |
Ilija Tovilo |
Use zend_error_noreturn for E_ERROR consistently To be clear, these already don't return. zend_error_noreturn just hints at this fact through the ZEND_NORETURN attribute. Closes
Use zend_error_noreturn for E_ERROR consistently To be clear, these already don't return. zend_error_noreturn just hints at this fact through the ZEND_NORETURN attribute. Closes GH-12204
show more ...
|
#
82aa4253 |
| 31-Jul-2023 |
Ilija Tovilo |
Fix some uouv in ext/pgsql
|
#
7ae0273b |
| 12-Jul-2023 |
Máté Kocsis |
Make the $row param of pg_fetch_result(), pg_field_prtlen() and pg_field_is_null() nullable
|
#
21aaf332 |
| 21-Jun-2023 |
Remi Collet |
check PQsetErrorContextVisibility availability (libpq >= 9.6)
|
#
f194cdf8 |
| 08-Jun-2023 |
David CARLIER |
ext/pgsql: fix PGtrace invalid free issue. disable trace when closing the connection, is a no op if there is no stream attached to it. Close GH-11403
|
#
dd8514a0 |
| 07-Jun-2023 |
David CARLIER |
ext/pgsql: adding pg_set_error_context_visibility. another level of context for pg_last_error/pg_result_error() to include or not the context in those. PQSHOW_CONTEXT_ERRORS being the de
ext/pgsql: adding pg_set_error_context_visibility. another level of context for pg_last_error/pg_result_error() to include or not the context in those. PQSHOW_CONTEXT_ERRORS being the default. Close GH-11395
show more ...
|
#
d5ad7510 |
| 08-Jun-2023 |
George Peter Banyard |
More usage of known zend_str instead of C string (#11381)
|
#
16a63d7b |
| 13-May-2023 |
David CARLIER |
ext/pgsql: php_pgsql_convert converts E_NOTICE to TypeError/ValueError exceptions. Close GH-11238
|
#
f31d2538 |
| 02-May-2023 |
David CARLIER |
ext/pgsql adding PGSQL_ERRORS_SQLSTATE constant support. Close GH-11181
|
#
2e0f75ec |
| 05-May-2023 |
David CARLIER |
ext/pgsql: pg_lo_read addressing the todo. (#11159)
|
#
7ec8ae12 |
| 09-Apr-2023 |
David Carlier |
ext/pgsql: pg_trace allow to refine its trace mode via 2 new constants. - PGSQL_TRACE_SUPPRESS_TIMESTAMPS. - PGSQL_TRACE_REGRESS_MODE to have a more verbose and observable output to
ext/pgsql: pg_trace allow to refine its trace mode via 2 new constants. - PGSQL_TRACE_SUPPRESS_TIMESTAMPS. - PGSQL_TRACE_REGRESS_MODE to have a more verbose and observable output to check possible regressions. Close GH-11041
show more ...
|
#
84c185c8 |
| 15-Apr-2023 |
David CARLIER |
ext/pgsql: pg_cancel_query internal update. Removing (obsolete) PGrequestCancel usage in favor of the thread-safe PQcancel/PQfreeCancel pair. Close GH-11081
|
#
6a9061e0 |
| 17-Mar-2023 |
David CARLIER |
Fix GH-9344: pgsql pipeline mode proposal. Adding pg_enter_pipeline_mode, pg_exit_pipeline_mode, pg_pipeline_sync and pg_pipeline_status. Close GH-10868
|
#
f0149c5c |
| 25-Apr-2023 |
Máté Kocsis |
Fix ZPP of pg_lo_export() Closes GH-11132
|