diff options
| author | Matteo Beccati <mbeccati@php.net> | 2020-08-31 10:45:36 +0200 |
|---|---|---|
| committer | Matteo Beccati <mbeccati@php.net> | 2020-08-31 11:03:03 +0200 |
| commit | 44ade0e87547f3f9ab8fdffb7bb0c8d530a90543 (patch) | |
| tree | e9b76e3f28c0103e1c0d4137a1b31c29bf1220ae /ext/pdo_pgsql/pgsql_statement.c | |
| parent | ad750c3bb6e7b48384c6265eb9d3bcf5b4000652 (diff) | |
| download | php-git-44ade0e87547f3f9ab8fdffb7bb0c8d530a90543.tar.gz | |
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).
Diffstat (limited to 'ext/pdo_pgsql/pgsql_statement.c')
| -rw-r--r-- | ext/pdo_pgsql/pgsql_statement.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index 86cb084a1d..c932ba817d 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -399,7 +399,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data * } break; } - } else if (param->is_param) { + } else if (param->is_param && event_type == PDO_PARAM_EVT_NORMALIZE) { /* We need to manually convert to a pg native boolean value */ if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL && ((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) { |
