mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
MFH: Add PDO::MYSQL_ATTR_COMPRESS connection flag [DOC]
This commit is contained in:
parent
42e3a93a8b
commit
0614a7763e
4 changed files with 13 additions and 2 deletions
|
@ -623,6 +623,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
|
|||
long local_infile = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_LOCAL_INFILE, 0 TSRMLS_CC);
|
||||
#ifndef PDO_USE_MYSQLND
|
||||
char *init_cmd = NULL, *default_file = NULL, *default_group = NULL;
|
||||
long compress = 0;
|
||||
#endif
|
||||
H->buffered = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1 TSRMLS_CC);
|
||||
|
||||
|
@ -692,6 +693,14 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
|
|||
}
|
||||
efree(default_group);
|
||||
}
|
||||
|
||||
compress = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_COMPRESS, 0 TSRMLS_CC);
|
||||
if (compress) {
|
||||
if (mysql_options(H->server, MYSQL_OPT_COMPRESS, 0)) {
|
||||
pdo_mysql_error(dbh);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue