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:02:34 +0200 |
| commit | ee2506cc027c97c86db51173ec7019c58b161204 (patch) | |
| tree | ceafe73102c7b86da0b961f8edbf13cbb2eb9387 /ext/pdo_sqlite/sqlite_driver.c | |
| parent | ad97739eac2f054d4ce3c3f492fefb0daaabaa25 (diff) | |
| download | php-git-ee2506cc027c97c86db51173ec7019c58b161204.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_sqlite/sqlite_driver.c')
| -rw-r--r-- | ext/pdo_sqlite/sqlite_driver.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index dcbc604739..26fa1c00eb 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -773,6 +773,9 @@ static int pdo_sqlite_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{ H->einfo.errmsg = NULL; dbh->driver_data = H; + /* skip all but this one param event */ + dbh->skip_param_evt = 0x7F ^ (1 << PDO_PARAM_EVT_EXEC_PRE); + filename = make_filename_safe(dbh->data_source); if (!filename) { |
