mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
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).
This commit is contained in:
parent
ad97739eac
commit
ee2506cc02
7 changed files with 29 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue